You are here

protected function Rss::_setLastBuildDate in Zircon Profile 8

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

Set date feed last build date

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Rss::_setLastBuildDate()
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 435

Class

Rss

Namespace

Zend\Feed\Writer\Renderer\Feed

Code

protected function _setLastBuildDate(DOMDocument $dom, DOMElement $root) {
  if (!$this
    ->getDataContainer()
    ->getLastBuildDate()) {
    return;
  }
  $lastBuildDate = $dom
    ->createElement('lastBuildDate');
  $root
    ->appendChild($lastBuildDate);
  $text = $dom
    ->createTextNode($this
    ->getDataContainer()
    ->getLastBuildDate()
    ->format(DateTime::RSS));
  $lastBuildDate
    ->appendChild($text);
}