equal
deleted
inserted
replaced
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: EntryAbstract.php 20096 2010-01-06 02:05:09Z bkarwin $ |
19 * @version $Id: EntryAbstract.php 25275 2013-03-06 09:55:33Z frosch $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @category Zend |
23 * @category Zend |
24 * @package Zend_Feed_Reader |
24 * @package Zend_Feed_Reader |
25 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
25 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
26 * @license http://framework.zend.com/license/new-bsd New BSD License |
26 * @license http://framework.zend.com/license/new-bsd New BSD License |
27 */ |
27 */ |
28 abstract class Zend_Feed_Reader_EntryAbstract |
28 abstract class Zend_Feed_Reader_EntryAbstract |
29 { |
29 { |
30 /** |
30 /** |
70 protected $_extensions = array(); |
70 protected $_extensions = array(); |
71 |
71 |
72 /** |
72 /** |
73 * Constructor |
73 * Constructor |
74 * |
74 * |
75 * @param DOMElement $entry |
75 * @param DOMElement $entry |
76 * @param int $entryKey |
76 * @param int $entryKey |
77 * @param string $type |
77 * @param string|null $type |
78 * @return void |
78 * @return void |
79 */ |
79 */ |
80 public function __construct(DOMElement $entry, $entryKey, $type = null) |
80 public function __construct(DOMElement $entry, $entryKey, $type = null) |
81 { |
81 { |
82 $this->_entry = $entry; |
82 $this->_entry = $entry; |
83 $this->_entryKey = $entryKey; |
83 $this->_entryKey = $entryKey; |
84 $this->_domDocument = $entry->ownerDocument; |
84 $this->_domDocument = $entry->ownerDocument; |
85 if ($type !== null) { |
85 if ($type !== null) { |
86 $this->_data['type'] = $type; |
86 $this->_data['type'] = $type; |
87 } else { |
87 } else { |
88 $this->_data['type'] = Zend_Feed_Reader::detectType($feed); |
88 $this->_data['type'] = Zend_Feed_Reader::detectType( |
|
89 $this->_domDocument |
|
90 ); |
89 } |
91 } |
90 $this->_loadExtensions(); |
92 $this->_loadExtensions(); |
91 } |
93 } |
92 |
94 |
93 /** |
95 /** |
210 if (method_exists($extension, $method)) { |
212 if (method_exists($extension, $method)) { |
211 return call_user_func_array(array($extension, $method), $args); |
213 return call_user_func_array(array($extension, $method), $args); |
212 } |
214 } |
213 } |
215 } |
214 require_once 'Zend/Feed/Exception.php'; |
216 require_once 'Zend/Feed/Exception.php'; |
215 throw new Zend_Feed_Exception('Method: ' . $method |
217 throw new Zend_Feed_Exception( |
216 . 'does not exist and could not be located on a registered Extension'); |
218 'Method: ' . $method |
|
219 . 'does not exist and could not be located on a registered Extension' |
|
220 ); |
217 } |
221 } |
218 |
222 |
219 /** |
223 /** |
220 * Load extensions from Zend_Feed_Reader |
224 * Load extensions from Zend_Feed_Reader |
221 * |
225 * |