/** * Sets a new Closure for this filter * * @param Closure $callback * @throws Exception\InvalidArgumentException * @return self */ public function setCallback($callback) { if (!$callback instanceof Closure) { throw new Exception\InvalidArgumentException(sprintf('Invalid parameter for callback: must be %s', Closure::class)); } return parent::setCallback($callback); }