Chris@16: data['author'])) { Chris@16: return $this->data['author']; Chris@16: } Chris@16: Chris@16: $author = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/googleplay:author)'); Chris@16: Chris@16: if (! $author) { Chris@16: $author = null; Chris@16: } Chris@16: Chris@16: $this->data['author'] = $author; Chris@16: Chris@16: return $this->data['author']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Get the entry block Chris@16: * Chris@16: * @return string Chris@16: */ Chris@16: public function getPlayPodcastBlock() Chris@16: { Chris@16: if (isset($this->data['block'])) { Chris@16: return $this->data['block']; Chris@16: } Chris@16: Chris@16: $block = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/googleplay:block)'); Chris@16: Chris@16: if (! $block) { Chris@16: $block = null; Chris@16: } Chris@16: Chris@16: $this->data['block'] = $block; Chris@16: Chris@16: return $this->data['block']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Get the entry category Chris@16: * Chris@16: * @return array|null Chris@16: */ Chris@16: public function getPlayPodcastCategories() Chris@16: { Chris@16: if (isset($this->data['categories'])) { Chris@16: return $this->data['categories']; Chris@16: } Chris@16: Chris@16: $categoryList = $this->xpath->query($this->getXpathPrefix() . '/googleplay:category'); Chris@16: Chris@16: $categories = []; Chris@16: Chris@16: if ($categoryList->length > 0) { Chris@16: foreach ($categoryList as $node) { Chris@16: $children = null; Chris@16: Chris@16: if ($node->childNodes->length > 0) { Chris@16: $children = []; Chris@16: Chris@16: foreach ($node->childNodes as $childNode) { Chris@16: if (! ($childNode instanceof DOMText)) { Chris@16: $children[$childNode->getAttribute('text')] = null; Chris@16: } Chris@16: } Chris@16: } Chris@16: Chris@16: $categories[$node->getAttribute('text')] = $children; Chris@16: } Chris@16: } Chris@16: Chris@16: if (! $categories) { Chris@16: $categories = null; Chris@16: } Chris@16: Chris@16: $this->data['categories'] = $categories; Chris@16: Chris@16: return $this->data['categories']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Get the entry explicit Chris@16: * Chris@16: * @return string Chris@16: */ Chris@16: public function getPlayPodcastExplicit() Chris@16: { Chris@16: if (isset($this->data['explicit'])) { Chris@16: return $this->data['explicit']; Chris@16: } Chris@16: Chris@16: $explicit = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/googleplay:explicit)'); Chris@16: Chris@16: if (! $explicit) { Chris@16: $explicit = null; Chris@16: } Chris@16: Chris@16: $this->data['explicit'] = $explicit; Chris@16: Chris@16: return $this->data['explicit']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Get the feed/podcast image Chris@16: * Chris@16: * @return string Chris@16: */ Chris@16: public function getPlayPodcastImage() Chris@16: { Chris@16: if (isset($this->data['image'])) { Chris@16: return $this->data['image']; Chris@16: } Chris@16: Chris@16: $image = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/googleplay:image/@href)'); Chris@16: Chris@16: if (! $image) { Chris@16: $image = null; Chris@16: } Chris@16: Chris@16: $this->data['image'] = $image; Chris@16: Chris@16: return $this->data['image']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Get the entry description Chris@16: * Chris@16: * @return string Chris@16: */ Chris@16: public function getPlayPodcastDescription() Chris@16: { Chris@16: if (isset($this->data['description'])) { Chris@16: return $this->data['description']; Chris@16: } Chris@16: Chris@16: $description = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/googleplay:description)'); Chris@16: Chris@16: if (! $description) { Chris@16: $description = null; Chris@16: } Chris@16: Chris@16: $this->data['description'] = $description; Chris@16: Chris@16: return $this->data['description']; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Register googleplay namespace Chris@16: * Chris@16: */ Chris@16: protected function registerNamespaces() Chris@16: { Chris@16: $this->xpath->registerNamespace('googleplay', 'http://www.google.com/schemas/play-podcasts/1.0'); Chris@16: } Chris@16: }