Chris@0: routes = $collection; Chris@0: $context = new RequestContext(); Chris@0: $context->fromRequest($request); Chris@0: $this->setContext($context); Chris@0: Chris@0: return $this->match($request->getPathInfo()); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: protected function getAttributes(Route $route, $name, array $attributes) Chris@0: { Chris@0: if ($route instanceof RouteObjectInterface && is_string($route->getRouteKey())) { Chris@0: $name = $route->getRouteKey(); Chris@0: } Chris@0: $attributes[RouteObjectInterface::ROUTE_NAME] = $name; Chris@0: $attributes[RouteObjectInterface::ROUTE_OBJECT] = $route; Chris@0: Chris@0: return $this->mergeDefaults($attributes, $route->getDefaults()); Chris@0: } Chris@0: }