|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Feed_Reader |
|
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
19 * @version $Id: Entry.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
20 */ |
|
21 |
|
22 /** |
|
23 * @see Zend_Feed_Reader |
|
24 */ |
|
25 require_once 'Zend/Feed/Reader.php'; |
|
26 |
|
27 /** |
|
28 * @see Zend_Feed_Reader_Extension_EntryAbstract |
|
29 */ |
|
30 require_once 'Zend/Feed/Reader/Extension/EntryAbstract.php'; |
|
31 |
|
32 /** |
|
33 * @category Zend |
|
34 * @package Zend_Feed_Reader |
|
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
36 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
37 */ |
|
38 class Zend_Feed_Reader_Extension_WellFormedWeb_Entry |
|
39 extends Zend_Feed_Reader_Extension_EntryAbstract |
|
40 { |
|
41 /** |
|
42 * Get the entry comment Uri |
|
43 * |
|
44 * @return string|null |
|
45 */ |
|
46 public function getCommentFeedLink() |
|
47 { |
|
48 $name = 'commentRss'; |
|
49 if (array_key_exists($name, $this->_data)) { |
|
50 return $this->_data[$name]; |
|
51 } |
|
52 |
|
53 $data = $this->_xpath->evaluate('string(' . $this->getXpathPrefix() . '/wfw:' . $name . ')'); |
|
54 |
|
55 if (!$data) { |
|
56 $data = null; |
|
57 } |
|
58 |
|
59 $this->_data[$name] = $data; |
|
60 |
|
61 return $data; |
|
62 } |
|
63 |
|
64 /** |
|
65 * Register Slash namespaces |
|
66 * |
|
67 * @return void |
|
68 */ |
|
69 protected function _registerNamespaces() |
|
70 { |
|
71 $this->_xpath->registerNamespace('wfw', 'http://wellformedweb.org/CommentAPI/'); |
|
72 } |
|
73 } |