public static function parse_list($response) { $result = array(); try { $atom = Atom::parse($response, new YouTubeDataMedia()); } catch (Exception $e) { throw new Exception($response); } foreach ($atom->arEntry() as $entry) { $obj = new self(); $links = $entry->link(); if (isset($links[0])) { $obj->url($links[0]->href()); } if (isset($links[3])) { $obj->mobile_url($links[3]->href()); } if ($entry->content() instanceof AtomContent) { $obj->content($entry->content()->value()); } $obj->title($entry->title()); $obj->published($entry->published()); $obj->updated($entry->updated()); $obj->keyword($entry->extra()->keyword()); $obj->duration($entry->extra()->duration()); $obj->player($entry->extra()->player()); $obj->category($entry->extra()->category()); $obj->thumbnail($entry->extra()->thumbnail()); $result[] = $obj; } return $result; }