File indexing completed on 2025-01-19 05:21:05
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Feed_Reader 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 * @version $Id$ 0020 */ 0021 0022 /** 0023 * @see Zend_Feed_Reader 0024 */ 0025 // require_once 'Zend/Feed/Reader.php'; 0026 0027 /** 0028 * @see Zend_Feed_Reader_Entry_EntryAbstract 0029 */ 0030 // require_once 'Zend/Feed/Reader/Extension/EntryAbstract.php'; 0031 0032 /** 0033 * @category Zend 0034 * @package Zend_Feed_Reader 0035 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0036 * @license http://framework.zend.com/license/new-bsd New BSD License 0037 */ 0038 class Zend_Feed_Reader_Extension_Content_Entry 0039 extends Zend_Feed_Reader_Extension_EntryAbstract 0040 { 0041 0042 public function getContent() 0043 { 0044 if ($this->getType() !== Zend_Feed_Reader::TYPE_RSS_10 0045 && $this->getType() !== Zend_Feed_Reader::TYPE_RSS_090 0046 ) { 0047 $content = $this->_xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)'); 0048 } else { 0049 $content = $this->_xpath->evaluate('string('.$this->getXpathPrefix().'/content:encoded)'); 0050 } 0051 return $content; 0052 } 0053 0054 /** 0055 * Register RSS Content Module namespace 0056 */ 0057 protected function _registerNamespaces() 0058 { 0059 $this->_xpath->registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/'); 0060 } 0061 }