/** * Constructor * * @param DOMElement $entry * @param int $entryKey * @param string $type * @return void */ public function __construct(\DOMElement $entry, $entryKey, $type = null) { $this->_entry = $entry; $this->_entryKey = $entryKey; $this->_domDocument = $entry->ownerDocument; if ($type !== null) { $this->_data['type'] = $type; } else { $this->_data['type'] = Reader::detectType($feed); } $this->_loadExtensions(); }
/** * Constructor * * @param DomDocument The DOM object for the feed's XML * @param string $type Feed type */ public function __construct(\DomDocument $domDocument, $type = null) { $this->_domDocument = $domDocument; $this->_xpath = new \DOMXPath($this->_domDocument); if ($type !== null) { $this->_data['type'] = $type; } else { $this->_data['type'] = Reader::detectType($this->_domDocument); } $this->_registerNamespaces(); $this->_indexEntries(); $this->_loadExtensions(); }