コード例 #1
0
ファイル: BindableClosure.php プロジェクト: coolms/common
 /**
  * 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);
 }