public function Publisher::setOptions in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Publisher.php \Zend\Feed\PubSubHubbub\Publisher::setOptions()
Process any injected configuration options
Parameters
array|Traversable $options Options array or Traversable object:
Return value
Throws
Exception\InvalidArgumentException
1 call to Publisher::setOptions()
- Publisher::__construct in vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Publisher.php - Constructor; accepts an array or Zend\Config\Config instance to preset options for the Publisher without calling all supported setter methods in turn.
File
- vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Publisher.php, line 72
Class
Namespace
Zend\Feed\PubSubHubbubCode
public function setOptions($options) {
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
if (!is_array($options)) {
throw new Exception\InvalidArgumentException('Array or Traversable object' . 'expected, got ' . gettype($options));
}
if (array_key_exists('hubUrls', $options)) {
$this
->addHubUrls($options['hubUrls']);
}
if (array_key_exists('updatedTopicUrls', $options)) {
$this
->addUpdatedTopicUrls($options['updatedTopicUrls']);
}
if (array_key_exists('parameters', $options)) {
$this
->setParameters($options['parameters']);
}
return $this;
}