ff19d0e16784133e6bb3a84f28922c8f51a5ff48
[yaffs-website] / vendor / zendframework / zend-feed / src / Reader / Extension / WellFormedWeb / 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\WellFormedWeb;
11
12 use Zend\Feed\Reader\Extension;
13
14 /**
15 */
16 class Entry extends Extension\AbstractEntry
17 {
18     /**
19      * Get the entry comment Uri
20      *
21      * @return string|null
22      */
23     public function getCommentFeedLink()
24     {
25         $name = 'commentRss';
26         if (array_key_exists($name, $this->data)) {
27             return $this->data[$name];
28         }
29
30         $data = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/wfw:' . $name . ')');
31
32         if (! $data) {
33             $data = null;
34         }
35
36         $this->data[$name] = $data;
37
38         return $data;
39     }
40
41     /**
42      * Register Slash namespaces
43      *
44      * @return void
45      */
46     protected function registerNamespaces()
47     {
48         $this->xpath->registerNamespace('wfw', 'http://wellformedweb.org/CommentAPI/');
49     }
50 }