db backup prior to drupal security update
[yaffs-website] / vendor / zendframework / zend-feed / src / Reader / Extension / Content / Entry.php
1 <?php
2 /**
3  * Zend Framework (http://framework.zend.com/)
4  *
5  * @link      http://github.com/zendframework/zf2 for the canonical source repository
6  * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7  * @license   http://framework.zend.com/license/new-bsd New BSD License
8  */
9
10 namespace Zend\Feed\Reader\Extension\Content;
11
12 use Zend\Feed\Reader;
13 use Zend\Feed\Reader\Extension;
14
15 class Entry extends Extension\AbstractEntry
16 {
17     public function getContent()
18     {
19         if ($this->getType() !== Reader\Reader::TYPE_RSS_10
20             && $this->getType() !== Reader\Reader::TYPE_RSS_090
21         ) {
22             $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)');
23         } else {
24             $content = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/content:encoded)');
25         }
26         return $content;
27     }
28
29     /**
30      * Register RSS Content Module namespace
31      */
32     protected function registerNamespaces()
33     {
34         $this->xpath->registerNamespace('content', 'http://purl.org/rss/1.0/modules/content/');
35     }
36 }