protected function AbstractAtom::_setGenerator 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::_setGenerator()
- 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\Atom\AbstractAtom::_setGenerator()
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::_setGenerator()
Set feed generator string
Parameters
DOMDocument $dom:
DOMElement $root:
Return value
void
1 call to AbstractAtom::_setGenerator()
- Atom::render in vendor/
zendframework/ zend-feed/ src/ Writer/ Renderer/ Feed/ Atom.php - Render Atom feed
1 method overrides AbstractAtom::_setGenerator()
- AtomSource::_setGenerator in vendor/
zendframework/ zend-feed/ src/ Writer/ Renderer/ Feed/ AtomSource.php - Set feed generator string
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Renderer/ Feed/ AbstractAtom.php, line 133
Class
Namespace
Zend\Feed\Writer\Renderer\FeedCode
protected function _setGenerator(DOMDocument $dom, DOMElement $root) {
if (!$this
->getDataContainer()
->getGenerator()) {
$this
->getDataContainer()
->setGenerator('Zend_Feed_Writer', Version::VERSION, 'http://framework.zend.com');
}
$gdata = $this
->getDataContainer()
->getGenerator();
$generator = $dom
->createElement('generator');
$root
->appendChild($generator);
$text = $dom
->createTextNode($gdata['name']);
$generator
->appendChild($text);
if (array_key_exists('uri', $gdata)) {
$generator
->setAttribute('uri', $gdata['uri']);
}
if (array_key_exists('version', $gdata)) {
$generator
->setAttribute('version', $gdata['version']);
}
}