You are here

public function Feed::addItunesAuthor in Zircon Profile 8.0

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

Add feed author

Parameters

string $value:

Return value

Feed

Throws

Writer\Exception\InvalidArgumentException

1 call to Feed::addItunesAuthor()
Feed::addItunesAuthors in vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php
Add feed authors

File

vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php, line 115

Class

Feed

Namespace

Zend\Feed\Writer\Extension\ITunes

Code

public function addItunesAuthor($value) {
  if ($this->stringWrapper
    ->strlen($value) > 255) {
    throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only' . ' contain a maximum of 255 characters each');
  }
  if (!isset($this->data['authors'])) {
    $this->data['authors'] = [];
  }
  $this->data['authors'][] = $value;
  return $this;
}