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_Extension_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_WellFormedWeb_Entry
0039     extends Zend_Feed_Reader_Extension_EntryAbstract
0040 {
0041     /**
0042      * Get the entry comment Uri
0043      *
0044      * @return string|null
0045      */
0046     public function getCommentFeedLink()
0047     {
0048         $name = 'commentRss';
0049         if (array_key_exists($name, $this->_data)) {
0050             return $this->_data[$name];
0051         }
0052 
0053         $data = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/wfw:' . $name . ')');
0054 
0055         if (!$data) {
0056             $data = null;
0057         }
0058 
0059         $this->_data[$name] = $data;
0060 
0061         return $data;
0062     }
0063 
0064     /**
0065      * Register Slash namespaces
0066      *
0067      * @return void
0068      */
0069     protected function _registerNamespaces()
0070     {
0071         $this->_xpath->registerNamespace('wfw', 'http://wellformedweb.org/CommentAPI/');
0072     }
0073 }