You are here

protected function Entry::_setDuration in Zircon Profile 8.0

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

Set entry duration

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Entry::_setDuration()
Entry::render in vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Renderer/Entry.php
Render entry

File

vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Renderer/Entry.php, line 108

Class

Entry

Namespace

Zend\Feed\Writer\Extension\ITunes\Renderer

Code

protected function _setDuration(DOMDocument $dom, DOMElement $root) {
  $duration = $this
    ->getDataContainer()
    ->getItunesDuration();
  if (!$duration) {
    return;
  }
  $el = $dom
    ->createElement('itunes:duration');
  $text = $dom
    ->createTextNode($duration);
  $el
    ->appendChild($text);
  $root
    ->appendChild($el);
  $this->called = true;
}