requestStack = $request_stack; $this->context = new RequestContext(); } /** * {@inheritdoc} * * generate(), generateFromRoute(), and getPathFromRoute() all call this * protected method. */ protected function getRoute($name) { if ($name === '') { return new Route('/'); } elseif ($name === '') { return new Route($this->requestStack->getCurrentRequest()->getPathInfo()); } elseif ($name === '') { return new Route(''); } throw new RouteNotFoundException(); } /** * {@inheritdoc} */ protected function processRoute($name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) { } /** * {@inheritdoc} */ protected function getInternalPathFromRoute($name, Route $route, $parameters = [], &$query_params = []) { return $route->getPath(); } /** * {@inheritdoc} */ public function setContext(SymfonyRequestContext $context) { } /** * {@inheritdoc} */ public function getContext() { } /** * {@inheritdoc} */ protected function processPath($path, &$options = [], BubbleableMetadata $bubbleable_metadata = NULL) { return $path; } }