/** * {@inheritDoc} */ public function match(Request $request) { if ($this->matcher->matches($request)) { return $this->router->match($request); } return null; }
/** * {@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); }