You are here

public function Entry::setItunesBlock in Zircon Profile 8.0

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

Set a block value of "yes" or "no". You may also set an empty string.

Parameters

string:

Return value

Entry

Throws

Writer\Exception\InvalidArgumentException

File

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

Class

Entry

Namespace

Zend\Feed\Writer\Extension\ITunes

Code

public function setItunesBlock($value) {
  if (!ctype_alpha($value) && strlen($value) > 0) {
    throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain alphabetic characters');
  }
  if ($this->stringWrapper
    ->strlen($value) > 255) {
    throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain a maximum of 255 characters');
  }
  $this->data['block'] = $value;
}