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_Reader |
16 * @package Zend_Feed_Reader |
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: Source.php 20785 2010-01-31 09:43:03Z mikaelkael $ |
19 * @version $Id: Source.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Feed_Reader_Feed_Atom |
23 * @see Zend_Feed_Reader_Feed_Atom |
24 */ |
24 */ |
25 require_once 'Zend/Feed/Reader/Feed/Atom.php'; |
25 require_once 'Zend/Feed/Reader/Feed/Atom.php'; |
26 |
26 |
27 /** |
27 /** |
28 * @category Zend |
28 * @category Zend |
29 * @package Zend_Feed_Reader |
29 * @package Zend_Feed_Reader |
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_Reader_Feed_Atom_Source extends Zend_Feed_Reader_Feed_Atom |
33 class Zend_Feed_Reader_Feed_Atom_Source extends Zend_Feed_Reader_Feed_Atom |
34 { |
34 { |
35 |
35 |
47 $this->_domDocument = $source->ownerDocument; |
47 $this->_domDocument = $source->ownerDocument; |
48 $this->_xpath = new DOMXPath($this->_domDocument); |
48 $this->_xpath = new DOMXPath($this->_domDocument); |
49 $this->_data['type'] = $type; |
49 $this->_data['type'] = $type; |
50 $this->_registerNamespaces(); |
50 $this->_registerNamespaces(); |
51 $this->_loadExtensions(); |
51 $this->_loadExtensions(); |
52 |
52 |
53 $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed'); |
53 $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('Atom_Feed'); |
54 $this->_extensions['Atom_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); |
54 $this->_extensions['Atom_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); |
55 $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed'); |
55 $atomClass = Zend_Feed_Reader::getPluginLoader()->getClassName('DublinCore_Feed'); |
56 $this->_extensions['DublinCore_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); |
56 $this->_extensions['DublinCore_Feed'] = new $atomClass($this->_domDocument, $this->_data['type'], $this->_xpath); |
57 foreach ($this->_extensions as $extension) { |
57 foreach ($this->_extensions as $extension) { |
58 $extension->setXpathPrefix(rtrim($xpathPrefix, '/') . '/atom:source'); |
58 $extension->setXpathPrefix(rtrim($xpathPrefix, '/') . '/atom:source'); |
59 } |
59 } |
60 } |
60 } |
61 |
61 |
62 /** |
62 /** |
63 * Since this is not an Entry carrier but a vehicle for Feed metadata, any |
63 * Since this is not an Entry carrier but a vehicle for Feed metadata, any |
64 * applicable Entry methods are stubbed out and do nothing. |
64 * applicable Entry methods are stubbed out and do nothing. |
65 */ |
65 */ |
66 |
66 |
67 /** |
67 /** |
68 * @return void |
68 * @return void |
69 */ |
69 */ |
70 public function count() {} |
70 public function count() {} |
71 |
71 |
72 /** |
72 /** |
73 * @return void |
73 * @return void |
74 */ |
74 */ |
75 public function current() {} |
75 public function current() {} |
76 |
76 |
77 /** |
77 /** |
78 * @return void |
78 * @return void |
79 */ |
79 */ |
80 public function key() {} |
80 public function key() {} |
81 |
81 |