本文整理汇总了PHP中Zend_Feed_Reader_FeedAbstract::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Feed_Reader_FeedAbstract::__construct方法的具体用法?PHP Zend_Feed_Reader_FeedAbstract::__construct怎么用?PHP Zend_Feed_Reader_FeedAbstract::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Feed_Reader_FeedAbstract
的用法示例。
在下文中一共展示了Zend_Feed_Reader_FeedAbstract::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
}
}
示例2: __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);
}
}