You are here

public function Feed::setItunesBlock in Zircon Profile 8

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

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

Parameters

string:

Return value

Feed

Throws

Writer\Exception\InvalidArgumentException

File

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

Class

Feed

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;
  return $this;
}