当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Feed_Reader::getPluginLoader方法代码示例

本文整理汇总了PHP中Zend_Feed_Reader::getPluginLoader方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Feed_Reader::getPluginLoader方法的具体用法?PHP Zend_Feed_Reader::getPluginLoader怎么用?PHP Zend_Feed_Reader::getPluginLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Feed_Reader的用法示例。


在下文中一共展示了Zend_Feed_Reader::getPluginLoader方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param  DOMDocument $dom
  * @param  string $type
  */
 public function __construct(DomDocument $dom, $type = null)
 {
     parent::__construct($dom, $type);
     $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed');
     $this->_extensions['Atom_Feed'] = new $atomClass($dom, $this->_data['type'], $this->_xpath);
     foreach ($this->_extensions as $extension) {
         $extension->setXpathPrefix('/atom:feed');
     }
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:15,代码来源:Atom.php

示例2: __construct

 /**
  * Constructor
  *
  * @param  DOMElement $entry
  * @param  int $entryKey
  * @param  string $type
  * @return void
  */
 public function __construct(DOMElement $entry, $entryKey, $type = null)
 {
     parent::__construct($entry, $entryKey, $type);
     // Everyone by now should know XPath indices start from 1 not 0
     $this->_xpathQuery = '//atom:entry[' . ($this->_entryKey + 1) . ']';
     $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Entry');
     $this->_extensions['Atom_Entry'] = new $atomClass($entry, $entryKey, $type);
     $threadClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Thread_Entry');
     $this->_extensions['Thread_Entry'] = new $threadClass($entry, $entryKey, $type);
 }
开发者ID:mtday,项目名称:timesheet-system,代码行数:18,代码来源:Atom.php

示例3: __construct

 /**
  * Constructor: Create a Source object which is largely just a normal
  * Zend_Feed_Reader_FeedAbstract object only designed to retrieve feed level
  * metadata from an Atom entry's source element.
  *
  * @param DOMElement $source
  * @param string $xpathPrefix Passed from parent Entry object
  * @param string $type Nearly always Atom 1.0
  */
 public function __construct(DOMElement $source, $xpathPrefix, $type = Zend_Feed_Reader::TYPE_ATOM_10)
 {
     $this->_domDocument = $source->ownerDocument;
     $this->_xpath = new DOMXPath($this->_domDocument);
     $this->_data['type'] = $type;
     $this->_registerNamespaces();
     $this->_loadExtensions();
     $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed');
     $this->_extensions['Atom_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath);
     $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed');
     $this->_extensions['DublinCore_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath);
     foreach ($this->_extensions as $extension) {
         $extension->setXpathPrefix(rtrim($xpathPrefix, '/') . '/atom:source');
     }
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:24,代码来源:Source.php

示例4: __construct

 /**
  * Constructor
  *
  * @param  DOMDocument $dom
  * @param  string $type
  */
 public function __construct(DomDocument $dom, $type = null)
 {
     parent::__construct($dom, $type);
     $dublinCoreClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed');
     $this->_extensions['DublinCore_Feed'] = new $dublinCoreClass($dom, $this->_data['type'], $this->_xpath);
     $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed');
     $this->_extensions['Atom_Feed'] = new $atomClass($dom, $this->_data['type'], $this->_xpath);
     if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090) {
         $xpathPrefix = '/rss/channel';
     } else {
         $xpathPrefix = '/rdf:RDF/rss:channel';
     }
     foreach ($this->_extensions as $extension) {
         $extension->setXpathPrefix($xpathPrefix);
     }
 }
开发者ID:Maxlander,项目名称:shixi,代码行数:22,代码来源:Rss.php

示例5: _loadExtensions

 /**
  * Load extensions from Zend_Feed_Reader
  *
  * @return void
  */
 protected function _loadExtensions()
 {
     $all = Zend_Feed_Reader::getExtensions();
     $feed = $all['entry'];
     foreach ($feed as $extension) {
         if (in_array($extension, $all['core'])) {
             continue;
         }
         $className = Zend_Feed_Reader::getPluginLoader()->getClassName($extension);
         $this->_extensions[$extension] = new $className($this->getElement(), $this->_entryKey, $this->_data['type']);
     }
 }
开发者ID:c12g,项目名称:stratos-php,代码行数:17,代码来源:EntryAbstract.php

示例6: testAddsPrefixPath

 public function testAddsPrefixPath()
 {
     Zend_Feed_Reader::addPrefixPath('A_B_C', '/A/B/C');
     $prefixPaths = Zend_Feed_Reader::getPluginLoader()->getPaths();
     $this->assertEquals('/A/B/C/', $prefixPaths['A_B_C_'][0]);
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:6,代码来源:ReaderTest.php

示例7: __construct

 /**
  * Constructor
  *
  * @param  Zend_Feed_Entry_Abstract $entry
  * @param  string $entryKey
  * @param  string $type
  * @return void
  */
 public function __construct(DOMElement $entry, $entryKey, $type = null)
 {
     parent::__construct($entry, $entryKey, $type);
     $this->_xpathQueryRss = '//item[' . ($this->_entryKey + 1) . ']';
     $this->_xpathQueryRdf = '//rss:item[' . ($this->_entryKey + 1) . ']';
     $pluginLoader = Zend_Feed_Reader::getPluginLoader();
     $dublinCoreClass = $pluginLoader->getClassName('DublinCore_Entry');
     $this->_extensions['DublinCore_Entry'] = new $dublinCoreClass($entry, $entryKey, $type);
     $contentClass = $pluginLoader->getClassName('Content_Entry');
     $this->_extensions['Content_Entry'] = new $contentClass($entry, $entryKey, $type);
     $atomClass = $pluginLoader->getClassName('Atom_Entry');
     $this->_extensions['Atom_Entry'] = new $atomClass($entry, $entryKey, $type);
     $wfwClass = $pluginLoader->getClassName('WellFormedWeb_Entry');
     $this->_extensions['WellFormedWeb_Entry'] = new $wfwClass($entry, $entryKey, $type);
     $slashClass = $pluginLoader->getClassName('Slash_Entry');
     $this->_extensions['Slash_Entry'] = new $slashClass($entry, $entryKey, $type);
     $threadClass = $pluginLoader->getClassName('Thread_Entry');
     $this->_extensions['Thread_Entry'] = new $threadClass($entry, $entryKey, $type);
 }
开发者ID:sepano,项目名称:open-social-media-monitoring,代码行数:27,代码来源:Rss.php


注:本文中的Zend_Feed_Reader::getPluginLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。