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


PHP Zend_Feed_Abstract::__wakeup方法代码示例

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


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

示例1: __wakeup

 /**
  * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
  *
  * @return void
  * @throws Zend_Feed_Exception
  */
 public function __wakeup()
 {
     parent::__wakeup();
     // Find the base feed element and create an alias to it.
     $element = $this->_element->getElementsByTagName('feed')->item(0);
     if (!$element) {
         // Try to find a single <entry> instead.
         $element = $this->_element->getElementsByTagName($this->_entryElementName)->item(0);
         if (!$element) {
             /** 
              * @see Zend_Feed_Exception
              */
             require_once 'Zend/Feed/Exception.php';
             throw new Zend_Feed_Exception('No root <feed> or <' . $this->_entryElementName . '> element found, cannot parse feed.');
         }
         $doc = new DOMDocument($this->_element->version, $this->_element->actualEncoding);
         $feed = $doc->appendChild($doc->createElement('feed'));
         $feed->appendChild($doc->importNode($element, true));
         $element = $feed;
     }
     $this->_element = $element;
     // Find the entries and save a pointer to them for speed and
     // simplicity.
     $this->_buildEntryCache();
 }
开发者ID:dalinhuang,项目名称:popo,代码行数:31,代码来源:Atom.php

示例2: __wakeup

 /**
  * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
  *
  * @return void
  * @throws Zend_Feed_Exception
  */
 public function __wakeup()
 {
     parent::__wakeup();
     // Find the base channel element and create an alias to it.
     $rdf = $this->_element->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF')->item(0);
     if ($rdf) {
         $this->_element = $rdf;
         $channel = $this->_element->getElementsByTagName('channel')->item(0);
         if ($channel->getElementsByTagName('title')->item(0)) {
             $this->_element->appendChild($channel->getElementsByTagName('title')->item(0));
         }
         if ($channel->getElementsByTagName('link')->item(0)) {
             $this->_element->appendChild($channel->getElementsByTagName('link')->item(0));
         }
         if ($channel->getElementsByTagName('description')->item(0)) {
             $this->_element->appendChild($channel->getElementsByTagName('description')->item(0));
         }
     } else {
         $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
     }
     if (!$this->_element) {
         /**
          * @see Zend_Feed_Exception
          */
         require_once 'external/Zend/Feed/Exception.php';
         throw new Zend_Feed_Exception('No root <channel> element found, cannot parse channel.');
     }
     // Find the entries and save a pointer to them for speed and
     // simplicity.
     $this->_buildEntryCache();
 }
开发者ID:emma5021,项目名称:toba,代码行数:37,代码来源:Rss.php

示例3: __wakeup

 /**
  * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
  */
 public function __wakeup()
 {
     parent::__wakeup();
     // Find the base feed element and create an alias to it.
     $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
     if (!$this->_element) {
         throw new Zend_Feed_Exception('No root <channel> element found, cannot parse feed.');
     }
     // Find the entries and save a pointer to them for speed and
     // simplicity.
     $this->_buildEntryCache();
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:15,代码来源:Rss.php

示例4: __wakeup

 /**
  * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
  *
  * @return void
  * @throws Zend_Feed_Exception
  */
 public function __wakeup()
 {
     parent::__wakeup();
     // Find the base channel element and create an alias to it.
     $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
     if (!$this->_element) {
         /** 
          * @see Zend_Feed_Exception
          */
         require_once 'src/common/Zend/Feed/Exception.php';
         throw new Zend_Feed_Exception('No root <channel> element found, cannot parse channel.');
     }
     // Find the entries and save a pointer to them for speed and
     // simplicity.
     $this->_buildEntryCache();
 }
开发者ID:ahmedadham88,项目名称:enhanced-social-network,代码行数:22,代码来源:Rss.php

示例5: __wakeup

 /**
  * Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
  *
  * @return void
  * @throws Zend_Feed_Exception
  */
 public function __wakeup()
 {
     parent::__wakeup();
     // Find the base channel element and create an alias to it.
     $rdfTags = $this->_element->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF');
     if ($rdfTags->length != 0) {
         $this->_element = $rdfTags->item(0);
     } else {
         $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
     }
     if (!$this->_element) {
         /**
          * @see Zend_Feed_Exception
          */
         throw new Zend_Feed_Exception('No root <channel> element found, cannot parse channel.');
     }
     // Find the entries and save a pointer to them for speed and
     // simplicity.
     $this->_buildEntryCache();
 }
开发者ID:kobmaki,项目名称:icingaweb2,代码行数:26,代码来源:Rss.php


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