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