From 3ea1d100e63a1b49669c46994ee3a2ee6c2c3e84 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Wed, 2 Oct 2024 15:04:01 +0200 Subject: [PATCH] Add type constants --- src/OEmbed.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OEmbed.php b/src/OEmbed.php index 46a929a..9deec28 100644 --- a/src/OEmbed.php +++ b/src/OEmbed.php @@ -7,6 +7,9 @@ class OEmbed{ + public const TYPE_JSON = 'application/json+oembed'; + public const TYPE_XML = 'text/xml+oembed'; + public static function decode(string $data,string $format='xml'): ?array{ if($format==='json'){ return self::decodeJSON($data);