You are here

public function Entry::addItunesAuthor in Zircon Profile 8

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

Add author to itunes entry

Parameters

string $value:

Return value

Entry

Throws

Writer\Exception\InvalidArgumentException

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

File

vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php, line 112

Class

Entry

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;
}