You are here

public function Feed::__call 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::__call()

Overloading: proxy to internal setters

Parameters

string $method:

array $params:

Return value

mixed

Throws

Writer\Exception\BadMethodCallException

File

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

Class

Feed

Namespace

Zend\Feed\Writer\Extension\ITunes

Code

public function __call($method, array $params) {
  $point = lcfirst(substr($method, 9));
  if (!method_exists($this, 'setItunes' . ucfirst($point)) && !method_exists($this, 'addItunes' . ucfirst($point))) {
    throw new Writer\Exception\BadMethodCallException('invalid method: ' . $method);
  }
  if (!array_key_exists($point, $this->data) || empty($this->data[$point])) {
    return;
  }
  return $this->data[$point];
}