public function Rss::getLinks in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getLinks()
Get all links
Return value
array
Overrides EntryInterface::getLinks
1 call to Rss::getLinks()
- Rss::getLink in vendor/
zendframework/ zend-feed/ src/ Reader/ Entry/ Rss.php - Get a specific link
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Entry/ Rss.php, line 374
Class
Namespace
Zend\Feed\Reader\EntryCode
public function getLinks() {
if (array_key_exists('links', $this->data)) {
return $this->data['links'];
}
$links = [];
if ($this
->getType() !== Reader\Reader::TYPE_RSS_10 && $this
->getType() !== Reader\Reader::TYPE_RSS_090) {
$list = $this->xpath
->query($this->xpathQueryRss . '//link');
}
else {
$list = $this->xpath
->query($this->xpathQueryRdf . '//rss:link');
}
if (!$list->length) {
$links = $this
->getExtension('Atom')
->getLinks();
}
else {
foreach ($list as $link) {
$links[] = $link->nodeValue;
}
}
$this->data['links'] = $links;
return $this->data['links'];
}