public function Subscriber::setParameter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber.php \Zend\Feed\PubSubHubbub\Subscriber::setParameter()
Add an optional parameter to the (un)subscribe requests
Parameters
string $name:
string|null $value:
Return value
Throws
Exception\InvalidArgumentException
1 call to Subscriber::setParameter()
- Subscriber::setParameters in vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber.php - Add an optional parameter to the (un)subscribe requests
File
- vendor/
zendframework/ zend-feed/ src/ PubSubHubbub/ Subscriber.php, line 442
Class
Namespace
Zend\Feed\PubSubHubbubCode
public function setParameter($name, $value = null) {
if (is_array($name)) {
$this
->setParameters($name);
return $this;
}
if (empty($name) || !is_string($name)) {
throw new Exception\InvalidArgumentException('Invalid parameter "name"' . ' of "' . $name . '" must be a non-empty string');
}
if ($value === null) {
$this
->removeParameter($name);
return $this;
}
if (empty($value) || !is_string($value) && $value !== null) {
throw new Exception\InvalidArgumentException('Invalid parameter "value"' . ' of "' . $value . '" must be a non-empty string');
}
$this->parameters[$name] = $value;
return $this;
}