Mercurial > hg > isophonics-drupal-site
annotate vendor/zendframework/zend-feed/src/Reader/Extension/Content/Entry.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 /** |
Chris@0 | 3 * Zend Framework (http://framework.zend.com/) |
Chris@0 | 4 * |
Chris@0 | 5 * @link http://github.com/zendframework/zf2 for the canonical source repository |
Chris@0 | 6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
Chris@0 | 7 * @license http://framework.zend.com/license/new-bsd New BSD License |
Chris@0 | 8 */ |
Chris@0 | 9 |
Chris@0 | 10 namespace Zend\Feed\Reader\Extension\Content; |
Chris@0 | 11 |
Chris@0 | 12 use Zend\Feed\Reader; |
Chris@0 | 13 use Zend\Feed\Reader\Extension; |
Chris@0 | 14 |
Chris@0 | 15 class Entry extends Extension\AbstractEntry |
Chris@0 | 16 { |
Chris@0 | 17 public function getContent() |
Chris@0 | 18 { |
Chris@0 | 19 if ($this->getType() !== Reader\Reader::TYPE_RSS_10 |
Chris@0 | 20 && $this->getType() !== Reader\Reader::TYPE_RSS_090 |
Chris@0 | 21 ) { |
Chris@0 | 22 $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)'); |
Chris@0 | 23 } else { |
Chris@0 | 24 $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)'); |
Chris@0 | 25 } |
Chris@0 | 26 return $content; |
Chris@0 | 27 } |
Chris@0 | 28 |
Chris@0 | 29 /** |
Chris@0 | 30 * Register RSS Content Module namespace |
Chris@0 | 31 */ |
Chris@0 | 32 protected function registerNamespaces() |
Chris@0 | 33 { |
Chris@0 | 34 $this->xpath->registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/'); |
Chris@0 | 35 } |
Chris@0 | 36 } |