/** * @param callable $filter * @return mixed */ private function callFilter(callable $filter) { $callbackReflection = new CallableReflection($filter); return $callbackReflection->invokeA($this->castServices($callbackReflection->getReflector()->getParameters())); }
/** * 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)); }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Missing key "a" for the 0th params of foo */ public function testInvokeAWithMissingParameter() { $reflectedCallable = new CallableReflection($this->getInstanceMethod()); $reflectedCallable->invokeA(array()); }