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.
16 * @package Zend_Feed_Reader
17 * @copyright Copyright (c) 2005-2008 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 16792 2009-07-17 02:52:37Z norm2782 $
23 * @see Zend_Feed_Reader
25 require_once 'Zend/Feed/Reader.php';
28 * @see Zend_Feed_Reader_Extension_EntryAbstract
30 require_once 'Zend/Feed/Reader/Extension/EntryAbstract.php';
34 * @package Zend_Feed_Reader
35 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
38 class Zend_Feed_Reader_Extension_Podcast_Entry
extends Zend_Feed_Reader_Extension_EntryAbstract
41 * Get the entry author
45 public function getCastAuthor()
47 if (isset($this->_data
['author'])) {
48 return $this->_data
['author'];
51 $author = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)');
57 $this->_data
['author'] = $author;
59 return $this->_data
['author'];
67 public function getBlock()
69 if (isset($this->_data
['block'])) {
70 return $this->_data
['block'];
73 $block = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)');
79 $this->_data
['block'] = $block;
81 return $this->_data
['block'];
85 * Get the entry duration
89 public function getDuration()
91 if (isset($this->_data
['duration'])) {
92 return $this->_data
['duration'];
95 $duration = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:duration)');
101 $this->_data
['duration'] = $duration;
103 return $this->_data
['duration'];
107 * Get the entry explicit
111 public function getExplicit()
113 if (isset($this->_data
['explicit'])) {
114 return $this->_data
['explicit'];
117 $explicit = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)');
123 $this->_data
['explicit'] = $explicit;
125 return $this->_data
['explicit'];
129 * Get the entry keywords
133 public function getKeywords()
135 if (isset($this->_data
['keywords'])) {
136 return $this->_data
['keywords'];
139 $keywords = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)');
145 $this->_data
['keywords'] = $keywords;
147 return $this->_data
['keywords'];
151 * Get the entry subtitle
155 public function getSubtitle()
157 if (isset($this->_data
['subtitle'])) {
158 return $this->_data
['subtitle'];
161 $subtitle = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)');
167 $this->_data
['subtitle'] = $subtitle;
169 return $this->_data
['subtitle'];
173 * Get the entry summary
177 public function getSummary()
179 if (isset($this->_data
['summary'])) {
180 return $this->_data
['summary'];
183 $summary = $this->_xpath
->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)');
189 $this->_data
['summary'] = $summary;
191 return $this->_data
['summary'];
195 * Register iTunes namespace
198 protected function _registerNamespaces()
200 $this->_xpath
->registerNamespace('itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd');