本文整理匯總了PHP中Zend\Feed\Reader\Reader::getExtensions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Reader::getExtensions方法的具體用法?PHP Reader::getExtensions怎麽用?PHP Reader::getExtensions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\Feed\Reader\Reader
的用法示例。
在下文中一共展示了Reader::getExtensions方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadExtensions
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;
}
}
示例2: _loadExtensions
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);
}
}
示例3: loadExtensions
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;
}
}
示例4: _loadExtensions
/**
* 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']);
}
}
示例5: _loadExtensions
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);
}
}