3 namespace Friendica\Object;
8 * @see https://oembed.com/#section2.3
10 * @author Hypolite Petovan <hypolite@mrpetovan.com>
14 public $embed_url = '';
18 public $author_name = '';
19 public $author_url = '';
20 public $provider_name = '';
21 public $provider_url = '';
22 public $cache_age = '';
23 public $thumbnail_url = '';
24 public $thumbnail_width = '';
25 public $thumbnail_height = '';
31 public function __construct($embed_url)
33 $this->embed_url = $embed_url;
36 public function parseJSON($json_string)
38 $properties = json_decode($json_string, true);
40 if (empty($properties)) {
44 foreach ($properties as $key => $value) {
45 if (property_exists(__CLASS__, $key)) {
46 $this->{$key} = $value;