public function Feed::getHubs in Zircon Profile 8
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::getHubs()
Get an array of any supported Pusubhubbub endpoints
Return value
array|null
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Feed.php, line 361
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getHubs() {
if (array_key_exists('hubs', $this->data)) {
return $this->data['hubs'];
}
$hubs = [];
$list = $this->xpath
->query($this
->getXpathPrefix() . '//atom:link[@rel="hub"]/@href');
if ($list->length) {
foreach ($list as $uri) {
$hubs[] = $this
->absolutiseUri($uri->nodeValue);
}
}
else {
$hubs = null;
}
$this->data['hubs'] = $hubs;
return $this->data['hubs'];
}