public function Feed::setItunesImage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php \Zend\Feed\Writer\Extension\ITunes\Feed::setItunesImage()
Set feed image (icon)
Parameters
string $value:
Return value
Throws
Writer\Exception\InvalidArgumentException
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ ITunes/ Feed.php, line 172
Class
Namespace
Zend\Feed\Writer\Extension\ITunesCode
public function setItunesImage($value) {
if (!Uri::factory($value)
->isValid()) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "image" may only' . ' be a valid URI/IRI');
}
if (!in_array(substr($value, -3), [
'jpg',
'png',
])) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "image" may only' . ' use file extension "jpg" or "png" which must be the last three' . ' characters of the URI (i.e. no query string or fragment)');
}
$this->data['image'] = $value;
return $this;
}