protected function loadExtensions() { $all = Reader::getExtensions(); $manager = Reader::getExtensionManager(); $feed = $all['feed']; foreach ($feed as $extension) { if (in_array($extension, $all['core'])) { continue; } $plugin = $manager->get($extension); $plugin->setDomDocument($this->getDomDocument()); $plugin->setType($this->data['type']); $plugin->setXpath($this->xpath); $this->extensions[$extension] = $plugin; } }
protected function _loadExtensions() { $all = Reader\Reader::getExtensions(); $feed = $all['feed']; foreach ($feed as $extension) { if (in_array($extension, $all['core'])) { continue; } $className = Reader\Reader::getPluginLoader()->getClassName($extension); $this->_extensions[$extension] = new $className($this->getDomDocument(), $this->_data['type'], $this->_xpath); } }
protected function loadExtensions() { $all = Reader\Reader::getExtensions(); $manager = Reader\Reader::getExtensionManager(); $feed = $all['feed']; foreach ($feed as $extension) { if (in_array($extension, $all['core'])) { continue; } if (!$manager->has($extension)) { throw new Exception\RuntimeException(sprintf('Unable to load extension "%s"; cannot find class', $extension)); } $plugin = $manager->get($extension); $plugin->setDomDocument($this->getDomDocument()); $plugin->setType($this->data['type']); $plugin->setXpath($this->xpath); $this->extensions[$extension] = $plugin; } }
/** * Load extensions from Zend\Feed\Reader\Reader * * @return void */ protected function _loadExtensions() { $all = Reader::getExtensions(); $feed = $all['entry']; foreach ($feed as $extension) { if (in_array($extension, $all['core'])) { continue; } $className = Reader::getPluginLoader()->getClassName($extension); $this->extensions[$extension] = new $className($this->getElement(), $this->entryKey, $this->data['type']); } }
protected function _loadExtensions() { $all = Reader\Reader::getExtensions(); $feed = $all['feed']; foreach ($feed as $extension) { if (in_array($extension, $all['core'])) { continue; } if (!($className = Reader\Reader::getPluginLoader()->getClassName($extension))) { continue; } if (!class_exists($className)) { throw new Exception\RuntimeException(sprintf('Unable to load extension "%s"; cannot find class', $extension)); } $this->_extensions[$extension] = new $className($this->getDomDocument(), $this->_data['type'], $this->_xpath); } }