Пример #1
0
 function __construct(WebRequest $request, $content, $key)
 {
     parent::__construct($request);
     $this->webRequest = $request;
     $this->content = $content;
     $this->key = $key;
 }
Пример #2
0
 /**
  * @param Request $request
  * @param object $object
  * @param Factory $factory <-
  */
 function __construct(Request $request, $object, Factory $factory)
 {
     parent::__construct($request);
     $this->object = $object;
     $this->factory = $factory;
     $this->filters = $factory->getInstance(FilterRegistry::class);
     $this->parameterInjectionFilter = function (\ReflectionParameter $parameter) {
         $pattern = '/@param.+\\$' . $parameter->getName() . '.+' . DefaultProvider::INJECTION_TOKEN . '/';
         return preg_match($pattern, $parameter->getDeclaringFunction()->getDocComment());
     };
 }
Пример #3
0
 private function whenIRouteTheRequest()
 {
     $this->target = $this->router->route($this->request->request);
     $this->response = $this->target->respond();
 }
Пример #4
0
 /**
  * @param Request $request
  * @param callable $callback
  */
 function __construct(Request $request, $callback)
 {
     parent::__construct($request);
     $this->callback = $callback;
 }
Пример #5
0
 function __construct(Request $request, Responding $object)
 {
     parent::__construct($request);
     $this->object = $object;
 }
Пример #6
0
 /**
  * @param $str
  */
 private function thenTheTargetShouldRespond($str)
 {
     $this->assertEquals($str, $this->target->respond());
 }