public function Feed::addItunesOwner in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php \Zend\Feed\Writer\Extension\ITunes\Feed::addItunesOwner()
Add feed owner
Parameters
array $value:
Return value
Throws
Writer\Exception\InvalidArgumentException
1 call to Feed::addItunesOwner()
- Feed::addItunesOwners in vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ ITunes/ Feed.php - Add feed owners
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ ITunes/ Feed.php, line 286
Class
Namespace
Zend\Feed\Writer\Extension\ITunesCode
public function addItunesOwner(array $value) {
if (!isset($value['name']) || !isset($value['email'])) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" must' . ' be an array containing keys "name" and "email"');
}
if ($this->stringWrapper
->strlen($value['name']) > 255 || $this->stringWrapper
->strlen($value['email']) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" may only' . ' contain a maximum of 255 characters each for "name" and "email"');
}
if (!isset($this->data['owners'])) {
$this->data['owners'] = [];
}
$this->data['owners'][] = $value;
return $this;
}