protected function Feed::_setHubs in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Writer/Extension/Atom/Renderer/Feed.php \Zend\Feed\Writer\Extension\Atom\Renderer\Feed::_setHubs()
Set PuSH hubs
Parameters
DOMDocument $dom:
DOMElement $root:
Return value
void
1 call to Feed::_setHubs()
- Feed::render in vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ Atom/ Renderer/ Feed.php - Render feed
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ Atom/ Renderer/ Feed.php, line 94
Class
Namespace
Zend\Feed\Writer\Extension\Atom\RendererCode
protected function _setHubs(DOMDocument $dom, DOMElement $root) {
$hubs = $this
->getDataContainer()
->getHubs();
if (!$hubs || empty($hubs)) {
return;
}
foreach ($hubs as $hubUrl) {
$hub = $dom
->createElement('atom:link');
$hub
->setAttribute('rel', 'hub');
$hub
->setAttribute('href', $hubUrl);
$root
->appendChild($hub);
}
$this->called = true;
}