public function Rss::getId 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::getId()
- 8.0 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::getId()
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getId()
Get the entry ID
Return value
string
Overrides EntryInterface::getId
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Entry/ Rss.php, line 313
Class
Namespace
Zend\Feed\Reader\EntryCode
public function getId() {
if (array_key_exists('id', $this->data)) {
return $this->data['id'];
}
$id = null;
if ($this
->getType() !== Reader\Reader::TYPE_RSS_10 && $this
->getType() !== Reader\Reader::TYPE_RSS_090) {
$id = $this->xpath
->evaluate('string(' . $this->xpathQueryRss . '/guid)');
}
if (!$id) {
$id = $this
->getExtension('DublinCore')
->getId();
}
if (empty($id)) {
$id = $this
->getExtension('Atom')
->getId();
}
if (!$id) {
if ($this
->getPermalink()) {
$id = $this
->getPermalink();
}
elseif ($this
->getTitle()) {
$id = $this
->getTitle();
}
else {
$id = null;
}
}
$this->data['id'] = $id;
return $this->data['id'];
}