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