*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Feed / Reader / Extension / Podcast / Entry.php
blob7af22854219d6e3fe298ab3ab2380bb0e6779dfe
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
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 $
22 /**
23 * @see Zend_Feed_Reader
25 require_once 'Zend/Feed/Reader.php';
27 /**
28 * @see Zend_Feed_Reader_Extension_EntryAbstract
30 require_once 'Zend/Feed/Reader/Extension/EntryAbstract.php';
32 /**
33 * @category Zend
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
40 /**
41 * Get the entry author
43 * @return string
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)');
53 if (!$author) {
54 $author = null;
57 $this->_data['author'] = $author;
59 return $this->_data['author'];
62 /**
63 * Get the entry block
65 * @return string
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)');
75 if (!$block) {
76 $block = null;
79 $this->_data['block'] = $block;
81 return $this->_data['block'];
84 /**
85 * Get the entry duration
87 * @return string
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)');
97 if (!$duration) {
98 $duration = null;
101 $this->_data['duration'] = $duration;
103 return $this->_data['duration'];
107 * Get the entry explicit
109 * @return string
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)');
119 if (!$explicit) {
120 $explicit = null;
123 $this->_data['explicit'] = $explicit;
125 return $this->_data['explicit'];
129 * Get the entry keywords
131 * @return string
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)');
141 if (!$keywords) {
142 $keywords = null;
145 $this->_data['keywords'] = $keywords;
147 return $this->_data['keywords'];
151 * Get the entry subtitle
153 * @return string
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)');
163 if (!$subtitle) {
164 $subtitle = null;
167 $this->_data['subtitle'] = $subtitle;
169 return $this->_data['subtitle'];
173 * Get the entry summary
175 * @return string
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)');
185 if (!$summary) {
186 $summary = null;
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');