コード例 #1
0
 /**
  * @param FilterControllerEvent $event
  */
 public function onKernelController(FilterControllerEvent $event)
 {
     if (!$event->isMasterRequest()) {
         return;
     }
     $request = $event->getRequest();
     $app = $request->attributes->get('_app');
     if (!isset($app['interceptors'])) {
         return;
     }
     $this->manager->handle($request);
 }
コード例 #2
0
 /**
  * @test
  */
 public function requestIsHandled()
 {
     $attributes = ['_app' => ['interceptors' => ['foo_interceptor']]];
     $manager = new InterceptorManager(['foo_interceptor' => $this->interceptor]);
     $this->request->attributes->replace($attributes);
     $this->ensureInterceptorIsApplied($this->interceptor);
     $manager->handle($this->request);
 }