/** * {@inheritDoc} */ public function handleRequest(Request $request) { $match = $this->router->match($request); if ($match === null) { throw new HttpNotFoundException('No route matches the request.'); } $controller = $this->instantiator->instantiate($match->controller); return $this->actionDispatcher->dispatch($request, $match, $controller); }
/** * {@inheritDoc} */ public function canDispatch(Request $request, MatchedRoute $match, $controller) { return $this->dispatcher->canDispatch($request, $match, $controller); }