コード例 #1
0
 /**
  * @param callable $filter
  * @return mixed
  */
 private function callFilter(callable $filter)
 {
     $callbackReflection = new CallableReflection($filter);
     return $callbackReflection->invokeA($this->castServices($callbackReflection->getReflector()->getParameters()));
 }
コード例 #2
0
ファイル: Route.php プロジェクト: raphhh/puppy-application
 /**
  * Calls the controller and give it $matches and $services.
  *
  * @param ArrayAccess $services
  * @return mixed
  */
 public function call(ArrayAccess $services)
 {
     $callbackReflection = new CallableReflection($this->getController());
     return $callbackReflection->invokeA($this->prepareArgs($services, $callbackReflection));
 }
コード例 #3
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Missing key "a" for the 0th params of foo
  */
 public function testInvokeAWithMissingParameter()
 {
     $reflectedCallable = new CallableReflection($this->getInstanceMethod());
     $reflectedCallable->invokeA(array());
 }