3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Feed\Reader\Extension\Podcast;
12 use Zend\Feed\Reader\Extension;
16 class Entry extends Extension\AbstractEntry
19 * Get the entry author
23 public function getCastAuthor()
25 if (isset($this->data['author'])) {
26 return $this->data['author'];
29 $author = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)');
35 $this->data['author'] = $author;
37 return $this->data['author'];
45 public function getBlock()
47 if (isset($this->data['block'])) {
48 return $this->data['block'];
51 $block = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)');
57 $this->data['block'] = $block;
59 return $this->data['block'];
63 * Get the entry duration
67 public function getDuration()
69 if (isset($this->data['duration'])) {
70 return $this->data['duration'];
73 $duration = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:duration)');
79 $this->data['duration'] = $duration;
81 return $this->data['duration'];
85 * Get the entry explicit
89 public function getExplicit()
91 if (isset($this->data['explicit'])) {
92 return $this->data['explicit'];
95 $explicit = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)');
101 $this->data['explicit'] = $explicit;
103 return $this->data['explicit'];
107 * Get the entry keywords
111 public function getKeywords()
113 if (isset($this->data['keywords'])) {
114 return $this->data['keywords'];
117 $keywords = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)');
123 $this->data['keywords'] = $keywords;
125 return $this->data['keywords'];
129 * Get the entry subtitle
133 public function getSubtitle()
135 if (isset($this->data['subtitle'])) {
136 return $this->data['subtitle'];
139 $subtitle = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)');
145 $this->data['subtitle'] = $subtitle;
147 return $this->data['subtitle'];
151 * Get the entry summary
155 public function getSummary()
157 if (isset($this->data['summary'])) {
158 return $this->data['summary'];
161 $summary = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)');
167 $this->data['summary'] = $summary;
169 return $this->data['summary'];
173 * Register iTunes namespace
176 protected function registerNamespaces()
178 $this->xpath->registerNamespace('itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd');