12 * obtain it through the world-wide-web, please send an email |
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. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Feed_Writer |
16 * @package Zend_Feed_Writer |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Entry.php 22662 2010-07-24 17:37:36Z mabe $ |
19 * @version $Id: Entry.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Feed_Writer_Extension_RendererAbstract |
23 * @see Zend_Feed_Writer_Extension_RendererAbstract |
24 */ |
24 */ |
25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php'; |
25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php'; |
26 |
26 |
27 /** |
27 /** |
28 * @category Zend |
28 * @category Zend |
29 * @package Zend_Feed_Writer |
29 * @package Zend_Feed_Writer |
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
30 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 */ |
32 */ |
33 class Zend_Feed_Writer_Extension_Threading_Renderer_Entry |
33 class Zend_Feed_Writer_Extension_Threading_Renderer_Entry |
34 extends Zend_Feed_Writer_Extension_RendererAbstract |
34 extends Zend_Feed_Writer_Extension_RendererAbstract |
35 { |
35 { |
58 $this->_setCommentCount($this->_dom, $this->_base); |
58 $this->_setCommentCount($this->_dom, $this->_base); |
59 if ($this->_called) { |
59 if ($this->_called) { |
60 $this->_appendNamespaces(); |
60 $this->_appendNamespaces(); |
61 } |
61 } |
62 } |
62 } |
63 |
63 |
64 /** |
64 /** |
65 * Append entry namespaces |
65 * Append entry namespaces |
66 * |
66 * |
67 * @return void |
67 * @return void |
68 */ |
68 */ |
69 protected function _appendNamespaces() |
69 protected function _appendNamespaces() |
70 { |
70 { |
71 $this->getRootElement()->setAttribute('xmlns:thr', |
71 $this->getRootElement()->setAttribute('xmlns:thr', |
72 'http://purl.org/syndication/thread/1.0'); |
72 'http://purl.org/syndication/thread/1.0'); |
73 } |
73 } |
74 |
74 |
75 /** |
75 /** |
76 * Set comment link |
76 * Set comment link |
77 * |
77 * |
78 * @param DOMDocument $dom |
78 * @param DOMDocument $dom |
79 * @param DOMElement $root |
79 * @param DOMElement $root |
80 * @return void |
80 * @return void |
81 */ |
81 */ |
82 protected function _setCommentLink(DOMDocument $dom, DOMElement $root) |
82 protected function _setCommentLink(DOMDocument $dom, DOMElement $root) |
83 { |
83 { |
84 $link = $this->getDataContainer()->getCommentLink(); |
84 $link = $this->getDataContainer()->getCommentLink(); |
94 $clink->setAttribute('thr:count', $count); |
94 $clink->setAttribute('thr:count', $count); |
95 } |
95 } |
96 $root->appendChild($clink); |
96 $root->appendChild($clink); |
97 $this->_called = true; |
97 $this->_called = true; |
98 } |
98 } |
99 |
99 |
100 /** |
100 /** |
101 * Set comment feed links |
101 * Set comment feed links |
102 * |
102 * |
103 * @param DOMDocument $dom |
103 * @param DOMDocument $dom |
104 * @param DOMElement $root |
104 * @param DOMElement $root |
105 * @return void |
105 * @return void |
106 */ |
106 */ |
107 protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) |
107 protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) |
108 { |
108 { |
109 $links = $this->getDataContainer()->getCommentFeedLinks(); |
109 $links = $this->getDataContainer()->getCommentFeedLinks(); |
124 } |
124 } |
125 } |
125 } |
126 |
126 |
127 /** |
127 /** |
128 * Set entry comment count |
128 * Set entry comment count |
129 * |
129 * |
130 * @param DOMDocument $dom |
130 * @param DOMDocument $dom |
131 * @param DOMElement $root |
131 * @param DOMElement $root |
132 * @return void |
132 * @return void |
133 */ |
133 */ |
134 protected function _setCommentCount(DOMDocument $dom, DOMElement $root) |
134 protected function _setCommentCount(DOMDocument $dom, DOMElement $root) |
135 { |
135 { |
136 $count = $this->getDataContainer()->getCommentCount(); |
136 $count = $this->getDataContainer()->getCommentCount(); |