/** * @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); }
/** * @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); }