feed = $feed;
$this->data = $data;
}
/**
* Set the registry handler
*
* This is usually used by {@see \SimplePie\Registry::create}
*
* @since 1.3
* @param \SimplePie\Registry $registry
*/
public function set_registry(\SimplePie\Registry $registry)/* : void */
{
$this->registry = $registry;
}
/**
* Get a string representation of the item
*
* @return string
*/
public function __toString()
{
return md5(serialize($this->data));
}
/**
* Remove items that link back to this before destroying this object
*/
public function __destruct()
{
if (!gc_enabled()) {
unset($this->feed);
}
}
/**
* Get data for an item-level element
*
* This method allows you to get access to ANY element/attribute that is a
* sub-element of the item/entry tag.
*
* See {@see \SimplePie\SimplePie::get_feed_tags()} for a description of the return value
*
* @since 1.0
* @see http://simplepie.org/wiki/faq/supported_xml_namespaces
* @param string $namespace The URL of the XML namespace of the elements you're trying to access
* @param string $tag Tag name
* @return array
*/
public function get_item_tags($namespace, $tag)
{
if (isset($this->data['child'][$namespace][$tag])) {
return $this->data['child'][$namespace][$tag];
}
return null;
}
/**
* Get the base URL value.
* Uses `