protected function Feed::_setFeedLinks in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/Atom/Renderer/Feed.php \Zend\Feed\Writer\Extension\Atom\Renderer\Feed::_setFeedLinks()
Set feed link elements
Parameters
DOMDocument $dom:
DOMElement $root:
Return value
void
1 call to Feed::_setFeedLinks()
- 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 68
Class
Namespace
Zend\Feed\Writer\Extension\Atom\RendererCode
protected function _setFeedLinks(DOMDocument $dom, DOMElement $root) {
$flinks = $this
->getDataContainer()
->getFeedLinks();
if (!$flinks || empty($flinks)) {
return;
}
foreach ($flinks as $type => $href) {
if (strtolower($type) == $this
->getType()) {
// issue 2605
$mime = 'application/' . strtolower($type) . '+xml';
$flink = $dom
->createElement('atom:link');
$root
->appendChild($flink);
$flink
->setAttribute('rel', 'self');
$flink
->setAttribute('type', $mime);
$flink
->setAttribute('href', $href);
}
}
$this->called = true;
}