當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。