public function Entry::getLinks in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::getLinks()
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getLinks()
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getLinks()
Get all links
Return value
array
1 call to Entry::getLinks()
- Entry::getLink in vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Entry.php - Get a specific link
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Entry.php, line 344
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getLinks() {
if (array_key_exists('links', $this->data)) {
return $this->data['links'];
}
$links = [];
$list = $this
->getXpath()
->query($this
->getXpathPrefix() . '//atom:link[@rel="alternate"]/@href' . '|' . $this
->getXpathPrefix() . '//atom:link[not(@rel)]/@href');
if ($list->length) {
foreach ($list as $link) {
$links[] = $this
->absolutiseUri($link->value);
}
}
$this->data['links'] = $links;
return $this->data['links'];
}