X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony-cmf%2Frouting%2FNestedMatcher%2FUrlMatcher.php;fp=vendor%2Fsymfony-cmf%2Frouting%2FNestedMatcher%2FUrlMatcher.php;h=89f00a06ca2a78175fe0d40a0f520f2121d400c7;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php b/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php new file mode 100644 index 000000000..89f00a06c --- /dev/null +++ b/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php @@ -0,0 +1,56 @@ +routes = $collection; + $context = new RequestContext(); + $context->fromRequest($request); + $this->setContext($context); + + return $this->match($request->getPathInfo()); + } + + /** + * {@inheritdoc} + */ + protected function getAttributes(Route $route, $name, array $attributes) + { + if ($route instanceof RouteObjectInterface && is_string($route->getRouteKey())) { + $name = $route->getRouteKey(); + } + $attributes[RouteObjectInterface::ROUTE_NAME] = $name; + $attributes[RouteObjectInterface::ROUTE_OBJECT] = $route; + + return $this->mergeDefaults($attributes, $route->getDefaults()); + } +}