You are here

public function Entry::getDuration in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Reader/Extension/Podcast/Entry.php \Zend\Feed\Reader\Extension\Podcast\Entry::getDuration()

Get the entry duration

Return value

string

File

vendor/zendframework/zend-feed/src/Reader/Extension/Podcast/Entry.php, line 67

Class

Entry

Namespace

Zend\Feed\Reader\Extension\Podcast

Code

public function getDuration() {
  if (isset($this->data['duration'])) {
    return $this->data['duration'];
  }
  $duration = $this->xpath
    ->evaluate('string(' . $this
    ->getXpathPrefix() . '/itunes:duration)');
  if (!$duration) {
    $duration = null;
  }
  $this->data['duration'] = $duration;
  return $this->data['duration'];
}