You are here

protected function Rss::_setLanguage in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Rss.php \Zend\Feed\Writer\Renderer\Feed\Rss::_setLanguage()

Set feed language

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Rss::_setLanguage()
Rss::render in vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Rss.php
Render RSS feed

File

vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Rss.php, line 102

Class

Rss

Namespace

Zend\Feed\Writer\Renderer\Feed

Code

protected function _setLanguage(DOMDocument $dom, DOMElement $root) {
  $lang = $this
    ->getDataContainer()
    ->getLanguage();
  if (!$lang) {
    return;
  }
  $language = $dom
    ->createElement('language');
  $root
    ->appendChild($language);
  $language->nodeValue = $lang;
}