Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS.
At this point, we're pretty much assuming that all enclosures for an item are the same content. Anything else is too complicated to properly support.
{
if (!isset($this->data['enclosures']))
{
$this->data['enclosures'] = array();
$captions_parent = null;
$categories_parent = null;
$copyrights_parent = null;
$credits_parent = null;
$description_parent = null;
$duration_parent = null;
$hashes_parent = null;
$keywords_parent = null;
$player_parent = null;
$ratings_parent = null;
$restrictions_parent = null;
$thumbnails_parent = null;
$title_parent = null;
{
foreach ($captions as $caption)
{
$caption_type = null;
$caption_lang = null;
$caption_startTime = null;
$caption_endTime = null;
$caption_text = null;
if (isset($caption['attribs']['']['type']))
{
}
if (isset($caption['attribs']['']['lang']))
{
}
if (isset($caption['attribs']['']['start']))
{
}
if (isset($caption['attribs']['']['end']))
{
}
if (isset($caption['data']))
{
}
$captions_parent[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
}
{
foreach ($captions as $caption)
{
$caption_type = null;
$caption_lang = null;
$caption_startTime = null;
$caption_endTime = null;
$caption_text = null;
if (isset($caption['attribs']['']['type']))
{
}
if (isset($caption['attribs']['']['lang']))
{
}
if (isset($caption['attribs']['']['start']))
{
}
if (isset($caption['attribs']['']['end']))
{
}
if (isset($caption['data']))
{
}
$captions_parent[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
}
if (is_array($captions_parent))
{
}
{
$term = null;
$scheme = null;
$label = null;
if (isset($category['data']))
{
}
if (isset($category['attribs']['']['scheme']))
{
}
else
{
$scheme = 'http://search.yahoo.com/mrss/category_schema';
}
if (isset($category['attribs']['']['label']))
{
}
$categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
{
$term = null;
$scheme = null;
$label = null;
if (isset($category['data']))
{
}
if (isset($category['attribs']['']['scheme']))
{
}
else
{
$scheme = 'http://search.yahoo.com/mrss/category_schema';
}
if (isset($category['attribs']['']['label']))
{
}
$categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
{
$term = null;
$scheme = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
$label = null;
if (isset($category['attribs']['']['text']))
{
}
$categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
{
foreach ((array) $category['child'][SIMPLEPIE_NAMESPACE_ITUNES]['category'] as $subcategory)
{
if (isset($subcategory['attribs']['']['text']))
{
}
$categories_parent[] = new $this->feed->category_class($term, $scheme, $label);
}
}
}
if (is_array($categories_parent))
{
}
{
$copyright_url = null;
$copyright_label = null;
if (isset($copyright[0]['attribs']['']['url']))
{
}
if (isset($copyright[0]['data']))
{
}
$copyrights_parent = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
{
$copyright_url = null;
$copyright_label = null;
if (isset($copyright[0]['attribs']['']['url']))
{
}
if (isset($copyright[0]['data']))
{
}
$copyrights_parent = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
{
foreach ($credits as $credit)
{
$credit_role = null;
$credit_scheme = null;
$credit_name = null;
if (isset($credit['attribs']['']['role']))
{
}
if (isset($credit['attribs']['']['scheme']))
{
}
else
{
$credit_scheme = 'urn:ebu';
}
if (isset($credit['data']))
{
}
$credits_parent[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
}
{
foreach ($credits as $credit)
{
$credit_role = null;
$credit_scheme = null;
$credit_name = null;
if (isset($credit['attribs']['']['role']))
{
}
if (isset($credit['attribs']['']['scheme']))
{
}
else
{
$credit_scheme = 'urn:ebu';
}
if (isset($credit['data']))
{
}
$credits_parent[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
}
if (is_array($credits_parent))
{
}
{
if (isset($description_parent[0]['data']))
{
}
}
{
if (isset($description_parent[0]['data']))
{
}
}
if ($duration_parent = $this->
get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES,
'duration'))
{
$seconds = null;
$minutes = null;
$hours = null;
if (isset($duration_parent[0]['data']))
{
if (sizeof($temp) > 0)
{
(int) $seconds = array_pop($temp);
}
if (sizeof($temp) > 0)
{
(int) $minutes = array_pop($temp);
$seconds += $minutes * 60;
}
if (sizeof($temp) > 0)
{
(int) $hours = array_pop($temp);
$seconds += $hours * 3600;
}
unset($temp);
$duration_parent = $seconds;
}
}
{
foreach ($hashes_iterator as $hash)
{
$value = null;
$algo = null;
if (isset($hash['data']))
{
}
if (isset($hash['attribs']['']['algo']))
{
}
else
{
$algo = 'md5';
}
$hashes_parent[] = $algo.':'.$value;
}
}
{
foreach ($hashes_iterator as $hash)
{
$value = null;
$algo = null;
if (isset($hash['data']))
{
}
if (isset($hash['attribs']['']['algo']))
{
}
else
{
$algo = 'md5';
}
$hashes_parent[] = $algo.':'.$value;
}
}
if (is_array($hashes_parent))
{
}
{
if (isset($keywords[0]['data']))
{
foreach ($temp as $word)
{
$keywords_parent[] = trim($word);
}
}
unset($temp);
}
elseif ($keywords = $this->
get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES,
'keywords'))
{
if (isset($keywords[0]['data']))
{
foreach ($temp as $word)
{
$keywords_parent[] = trim($word);
}
}
unset($temp);
}
{
if (isset($keywords[0]['data']))
{
foreach ($temp as $word)
{
$keywords_parent[] = trim($word);
}
}
unset($temp);
}
elseif ($keywords = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'keywords'))
{
if (isset($keywords[0]['data']))
{
foreach ($temp as $word)
{
$keywords_parent[] = trim($word);
}
}
unset($temp);
}
if (is_array($keywords_parent))
{
}
{
if (isset($player_parent[0]['attribs']['']['url']))
{
}
}
{
if (isset($player_parent[0]['attribs']['']['url']))
{
}
}
{
foreach ($ratings as $rating)
{
$rating_scheme = null;
$rating_value = null;
if (isset($rating['attribs']['']['scheme']))
{
}
else
{
$rating_scheme = 'urn:simple';
}
if (isset($rating['data']))
{
}
$ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
elseif ($ratings = $this->
get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES,
'explicit'))
{
foreach ($ratings as $rating)
{
$rating_scheme = 'urn:itunes';
$rating_value = null;
if (isset($rating['data']))
{
}
$ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
{
foreach ($ratings as $rating)
{
$rating_scheme = null;
$rating_value = null;
if (isset($rating['attribs']['']['scheme']))
{
}
else
{
$rating_scheme = 'urn:simple';
}
if (isset($rating['data']))
{
}
$ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
elseif ($ratings = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'explicit'))
{
foreach ($ratings as $rating)
{
$rating_scheme = 'urn:itunes';
$rating_value = null;
if (isset($rating['data']))
{
}
$ratings_parent[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
}
if (is_array($ratings_parent))
{
}
{
foreach ($restrictions as $restriction)
{
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
{
}
if (isset($restriction['attribs']['']['type']))
{
}
if (isset($restriction['data']))
{
}
$restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
elseif ($restrictions = $this->
get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES,
'block'))
{
foreach ($restrictions as $restriction)
{
$restriction_relationship = 'allow';
$restriction_type = null;
$restriction_value = 'itunes';
if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes')
{
$restriction_relationship = 'deny';
}
$restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
{
foreach ($restrictions as $restriction)
{
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
{
}
if (isset($restriction['attribs']['']['type']))
{
}
if (isset($restriction['data']))
{
}
$restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
elseif ($restrictions = $parent->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'block'))
{
foreach ($restrictions as $restriction)
{
$restriction_relationship = 'allow';
$restriction_type = null;
$restriction_value = 'itunes';
if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes')
{
$restriction_relationship = 'deny';
}
$restrictions_parent[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
}
if (is_array($restrictions_parent))
{
}
{
foreach ($thumbnails as $thumbnail)
{
if (isset($thumbnail['attribs']['']['url']))
{
}
}
}
{
foreach ($thumbnails as $thumbnail)
{
if (isset($thumbnail['attribs']['']['url']))
{
}
}
}
{
if (isset($title_parent[0]['data']))
{
}
}
{
if (isset($title_parent[0]['data']))
{
}
}
unset($parent);
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
$captions = null;
$categories = null;
$copyrights = null;
$credits = null;
$description = null;
$hashes = null;
$keywords = null;
$player = null;
$ratings = null;
$restrictions = null;
$thumbnails = null;
$title = null;
{
{
if (isset($content['attribs']['']['url']))
{
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
$captions = null;
$categories = null;
$copyrights = null;
$credits = null;
$description = null;
$hashes = null;
$keywords = null;
$player = null;
$ratings = null;
$restrictions = null;
$thumbnails = null;
$title = null;
if (isset($content['attribs']['']['bitrate']))
{
}
if (isset($content['attribs']['']['channels']))
{
}
if (isset($content['attribs']['']['duration']))
{
}
else
{
$duration = $duration_parent;
}
if (isset($content['attribs']['']['expression']))
{
}
if (isset($content['attribs']['']['framerate']))
{
}
if (isset($content['attribs']['']['height']))
{
}
if (isset($content['attribs']['']['lang']))
{
}
if (isset($content['attribs']['']['fileSize']))
{
$length = ceil($content['attribs']['']['fileSize']);
}
if (isset($content['attribs']['']['medium']))
{
}
if (isset($content['attribs']['']['samplingrate']))
{
}
if (isset($content['attribs']['']['type']))
{
}
if (isset($content['attribs']['']['width']))
{
}
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
{
$caption_type = null;
$caption_lang = null;
$caption_startTime = null;
$caption_endTime = null;
$caption_text = null;
if (isset($caption['attribs']['']['type']))
{
}
if (isset($caption['attribs']['']['lang']))
{
}
if (isset($caption['attribs']['']['start']))
{
}
if (isset($caption['attribs']['']['end']))
{
}
if (isset($caption['data']))
{
}
$captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
{
$caption_type = null;
$caption_lang = null;
$caption_startTime = null;
$caption_endTime = null;
$caption_text = null;
if (isset($caption['attribs']['']['type']))
{
}
if (isset($caption['attribs']['']['lang']))
{
}
if (isset($caption['attribs']['']['start']))
{
}
if (isset($caption['attribs']['']['end']))
{
}
if (isset($caption['data']))
{
}
$captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
}
}
else
{
$captions = $captions_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
{
foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
{
$term = null;
$scheme = null;
$label = null;
if (isset($category['data']))
{
}
if (isset($category['attribs']['']['scheme']))
{
}
else
{
$scheme = 'http://search.yahoo.com/mrss/category_schema';
}
if (isset($category['attribs']['']['label']))
{
}
$categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
{
foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
{
$term = null;
$scheme = null;
$label = null;
if (isset($category['data']))
{
}
if (isset($category['attribs']['']['scheme']))
{
}
else
{
$scheme = 'http://search.yahoo.com/mrss/category_schema';
}
if (isset($category['attribs']['']['label']))
{
}
$categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (is_array($categories) && is_array($categories_parent))
{
}
elseif (is_array($categories))
{
}
elseif (is_array($categories_parent))
{
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
{
$copyright_url = null;
$copyright_label = null;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
{
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
{
}
$copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
{
$copyright_url = null;
$copyright_label = null;
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
{
}
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
{
}
$copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
else
{
$copyrights = $copyrights_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
{
$credit_role = null;
$credit_scheme = null;
$credit_name = null;
if (isset($credit['attribs']['']['role']))
{
}
if (isset($credit['attribs']['']['scheme']))
{
}
else
{
$credit_scheme = 'urn:ebu';
}
if (isset($credit['data']))
{
}
$credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
{
$credit_role = null;
$credit_scheme = null;
$credit_name = null;
if (isset($credit['attribs']['']['role']))
{
}
if (isset($credit['attribs']['']['scheme']))
{
}
else
{
$credit_scheme = 'urn:ebu';
}
if (isset($credit['data']))
{
}
$credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
}
}
else
{
$credits = $credits_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
{
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
{
}
else
{
$description = $description_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
{
$value = null;
$algo = null;
if (isset($hash['data']))
{
}
if (isset($hash['attribs']['']['algo']))
{
}
else
{
$algo = 'md5';
}
$hashes[] = $algo.':'.$value;
}
if (is_array($hashes))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
{
$value = null;
$algo = null;
if (isset($hash['data']))
{
}
if (isset($hash['attribs']['']['algo']))
{
}
else
{
$algo = 'md5';
}
$hashes[] = $algo.':'.$value;
}
if (is_array($hashes))
{
}
}
else
{
$hashes = $hashes_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
{
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
{
foreach ($temp as $word)
{
$keywords[] = trim($word);
}
unset($temp);
}
if (is_array($keywords))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
{
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
{
foreach ($temp as $word)
{
$keywords[] = trim($word);
}
unset($temp);
}
if (is_array($keywords))
{
}
}
else
{
$keywords = $keywords_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
{
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
{
}
else
{
$player = $player_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
{
$rating_scheme = null;
$rating_value = null;
if (isset($rating['attribs']['']['scheme']))
{
}
else
{
$rating_scheme = 'urn:simple';
}
if (isset($rating['data']))
{
}
$ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
{
$rating_scheme = null;
$rating_value = null;
if (isset($rating['attribs']['']['scheme']))
{
}
else
{
$rating_scheme = 'urn:simple';
}
if (isset($rating['data']))
{
}
$ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
}
}
else
{
$ratings = $ratings_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
{
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
{
}
if (isset($restriction['attribs']['']['type']))
{
}
if (isset($restriction['data']))
{
}
$restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
{
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
{
}
if (isset($restriction['attribs']['']['type']))
{
}
if (isset($restriction['data']))
{
}
$restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
}
}
else
{
$restrictions = $restrictions_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
{
}
if (is_array($thumbnails))
{
}
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
{
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
{
}
if (is_array($thumbnails))
{
}
}
else
{
$thumbnails = $thumbnails_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
{
}
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
{
}
else
{
$title = $title_parent;
}
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
}
}
}
if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']))
{
foreach ((array) $this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content)
{
if (isset($content['attribs']['']['url']))
{
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
$captions = null;
$categories = null;
$copyrights = null;
$credits = null;
$description = null;
$hashes = null;
$keywords = null;
$player = null;
$ratings = null;
$restrictions = null;
$thumbnails = null;
$title = null;
if (isset($content['attribs']['']['bitrate']))
{
}
if (isset($content['attribs']['']['channels']))
{
}
if (isset($content['attribs']['']['duration']))
{
}
else
{
$duration = $duration_parent;
}
if (isset($content['attribs']['']['expression']))
{
}
if (isset($content['attribs']['']['framerate']))
{
}
if (isset($content['attribs']['']['height']))
{
}
if (isset($content['attribs']['']['lang']))
{
}
if (isset($content['attribs']['']['fileSize']))
{
$length = ceil($content['attribs']['']['fileSize']);
}
if (isset($content['attribs']['']['medium']))
{
}
if (isset($content['attribs']['']['samplingrate']))
{
}
if (isset($content['attribs']['']['type']))
{
}
if (isset($content['attribs']['']['width']))
{
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
{
$caption_type = null;
$caption_lang = null;
$caption_startTime = null;
$caption_endTime = null;
$caption_text = null;
if (isset($caption['attribs']['']['type']))
{
}
if (isset($caption['attribs']['']['lang']))
{
}
if (isset($caption['attribs']['']['start']))
{
}
if (isset($caption['attribs']['']['end']))
{
}
if (isset($caption['data']))
{
}
$captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text);
}
if (is_array($captions))
{
}
}
else
{
$captions = $captions_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
{
foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)
{
$term = null;
$scheme = null;
$label = null;
if (isset($category['data']))
{
}
if (isset($category['attribs']['']['scheme']))
{
}
else
{
$scheme = 'http://search.yahoo.com/mrss/category_schema';
}
if (isset($category['attribs']['']['label']))
{
}
$categories[] = new $this->feed->category_class($term, $scheme, $label);
}
}
if (is_array($categories) && is_array($categories_parent))
{
}
elseif (is_array($categories))
{
}
elseif (is_array($categories_parent))
{
}
else
{
$categories = null;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright']))
{
$copyright_url = null;
$copyright_label = null;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url']))
{
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data']))
{
}
$copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label);
}
else
{
$copyrights = $copyrights_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
{
$credit_role = null;
$credit_scheme = null;
$credit_name = null;
if (isset($credit['attribs']['']['role']))
{
}
if (isset($credit['attribs']['']['scheme']))
{
}
else
{
$credit_scheme = 'urn:ebu';
}
if (isset($credit['data']))
{
}
$credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name);
}
if (is_array($credits))
{
}
}
else
{
$credits = $credits_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
{
}
else
{
$description = $description_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
{
$value = null;
$algo = null;
if (isset($hash['data']))
{
}
if (isset($hash['attribs']['']['algo']))
{
}
else
{
$algo = 'md5';
}
$hashes[] = $algo.':'.$value;
}
if (is_array($hashes))
{
}
}
else
{
$hashes = $hashes_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
{
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
{
foreach ($temp as $word)
{
$keywords[] = trim($word);
}
unset($temp);
}
if (is_array($keywords))
{
}
}
else
{
$keywords = $keywords_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
{
}
else
{
$player = $player_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
{
$rating_scheme = null;
$rating_value = null;
if (isset($rating['attribs']['']['scheme']))
{
}
else
{
$rating_scheme = 'urn:simple';
}
if (isset($rating['data']))
{
}
$ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value);
}
if (is_array($ratings))
{
}
}
else
{
$ratings = $ratings_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
{
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
{
}
if (isset($restriction['attribs']['']['type']))
{
}
if (isset($restriction['data']))
{
}
$restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
}
if (is_array($restrictions))
{
}
}
else
{
$restrictions = $restrictions_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
{
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
{
}
if (is_array($thumbnails))
{
}
}
else
{
$thumbnails = $thumbnails_parent;
}
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
{
}
else
{
$title = $title_parent;
}
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width);
}
}
}
{
if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
{
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
if (isset($link['attribs']['']['type']))
{
}
if (isset($link['attribs']['']['length']))
{
$length = ceil($link['attribs']['']['length']);
}
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
{
if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure')
{
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
if (isset($link['attribs']['']['type']))
{
}
if (isset($link['attribs']['']['length']))
{
$length = ceil($link['attribs']['']['length']);
}
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
{
if (isset($enclosure[0]['attribs']['']['url']))
{
$bitrate = null;
$channels = null;
$duration = null;
$expression = null;
$framerate = null;
$height = null;
$javascript = null;
$lang = null;
$length = null;
$medium = null;
$samplingrate = null;
$type = null;
$url = null;
$width = null;
if (isset($enclosure[0]['attribs']['']['type']))
{
}
if (isset($enclosure[0]['attribs']['']['length']))
{
$length = ceil($enclosure[0]['attribs']['']['length']);
}
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
{
$this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
}
if (!empty($this->data['enclosures']))
{
return $this->data['enclosures'];
}
else
{
return null;
}
}