public function Entry::setItunesDuration in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php \Zend\Feed\Writer\Extension\ITunes\Entry::setItunesDuration()
Set duration
Parameters
int $value:
Return value
Throws
Writer\Exception\InvalidArgumentException
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ ITunes/ Entry.php, line 132
Class
Namespace
Zend\Feed\Writer\Extension\ITunesCode
public function setItunesDuration($value) {
$value = (string) $value;
if (!ctype_digit($value) && !preg_match("/^\\d+:[0-5]{1}[0-9]{1}\$/", $value) && !preg_match("/^\\d+:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}\$/", $value)) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "duration" may only' . ' be of a specified [[HH:]MM:]SS format');
}
$this->data['duration'] = $value;
return $this;
}