public setDelegate ( callable $callable ) : void | ||
$callable | callable | Callable. |
return | void |
public function setDelegate($callable)
{
if (is_callable($callable)) {
$this->callback = $callable;
} else {
throw new \Exception('passed argument is not callable');
}
}