wp-includes/SimplePie/src/Item.php:57Manages all item-related data
$feedSimplePie\SimplePiepublic$dataarraypublic$registrySimplePie\Registryprotectedclass Item implements RegistryAware{ /** * Parent feed * * @access private * @var \SimplePie\SimplePie */ public $feed; /** * Raw data * * @access private * @var array */ public $data = []; /** * Registry object * * @see set_registry * @var \SimplePie\Registry */ protected $registry; /** * Create a new item object * * This is usually used by {@see \SimplePie\SimplePie::get_items} and * {@see \SimplePie\SimplePie::get_item}. Avoid creating this manually. * * @param \SimplePie\SimplePie $feed Parent feed * @param array $data Raw data */ public function __construct($feed, $data) { $this->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. *3 changes between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
get_own_base() added.verified against sourceset_sanitize() added.verified against sourceget_sanitize() added.verified against sourcesrc/wp-includes/SimplePie/src/Item.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.