protected function innerHandle(Request $request, $type)
{
$this->requests->push($request);
if ($this->eventDispatcher !== null) {
$event = new GetResponseEvent($this, $request, $type);
$this->eventDispatcher->dispatch(KernelEvents::REQUEST, $event);
$response = $event->getResponse() ?: $this->router->dispatch($request);
} else {
$response = $this->router->dispatch($request);
}
return $this->filterResponse($response, $request, $type);
}