public function Rss::getGenerator in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::getGenerator()
Get the feed generator entry
Return value
string|null
Overrides FeedInterface::getGenerator
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Feed/ Rss.php, line 525
Class
Namespace
Zend\Feed\Reader\FeedCode
public function getGenerator() {
if (array_key_exists('generator', $this->data)) {
return $this->data['generator'];
}
$generator = null;
if ($this
->getType() !== Reader\Reader::TYPE_RSS_10 && $this
->getType() !== Reader\Reader::TYPE_RSS_090) {
$generator = $this->xpath
->evaluate('string(/rss/channel/generator)');
}
if (!$generator) {
if ($this
->getType() !== Reader\Reader::TYPE_RSS_10 && $this
->getType() !== Reader\Reader::TYPE_RSS_090) {
$generator = $this->xpath
->evaluate('string(/rss/channel/atom:generator)');
}
else {
$generator = $this->xpath
->evaluate('string(/rdf:RDF/rss:channel/atom:generator)');
}
}
if (empty($generator)) {
$generator = $this
->getExtension('Atom')
->getGenerator();
}
if (!$generator) {
$generator = null;
}
$this->data['generator'] = $generator;
return $this->data['generator'];
}