public function Feed::getId in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getId()
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/DublinCore/Feed.php \Zend\Feed\Reader\Extension\DublinCore\Feed::getId()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getId()
Get the feed ID
Return value
string|null
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Feed.php, line 214
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getId() {
if (array_key_exists('id', $this->data)) {
return $this->data['id'];
}
$id = $this->xpath
->evaluate('string(' . $this
->getXpathPrefix() . '/atom:id)');
if (!$id) {
if ($this
->getLink()) {
$id = $this
->getLink();
}
elseif ($this
->getTitle()) {
$id = $this
->getTitle();
}
else {
$id = null;
}
}
$this->data['id'] = $id;
return $this->data['id'];
}