From 5aa6ad28ae7bc71a4719997fb01dede5d7875232 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Thu, 25 Nov 2010 13:38:04 -0600 Subject: [PATCH] Updating RouteCollection::getRoutes() call to RouteCollection::getAll() in many places. --- .../Bundle/FrameworkBundle/Command/RouterDebugCommand.php | 2 +- src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php | 2 +- .../Component/Routing/Generator/Dumper/PhpGeneratorDumper.php | 2 +- .../Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php | 2 +- .../Component/Routing/Matcher/Dumper/PhpMatcherDumper.php | 2 +- src/Symfony/Component/Routing/Matcher/UrlMatcher.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 4e61b25441..d8855f0ef4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -53,7 +53,7 @@ EOF $router = $this->container->get('router'); $routes = array(); - foreach ($router->getRouteCollection()->getRoutes() as $name => $route) { + foreach ($router->getRouteCollection()->all() as $name => $route) { $routes[$name] = $route->compile(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php index 682d7efe08..74227ee1d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php @@ -55,7 +55,7 @@ class DelegatingLoader extends BaseDelegatingLoader { $collection = parent::load($resource); - foreach ($collection->getRoutes() as $name => $route) { + foreach ($collection->all() as $name => $route) { if ($controller = $route->getDefault('_controller')) { try { $controller = $this->converter->fromShortNotation($controller); diff --git a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php index 330c1b28a7..4a8f83b10f 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -51,7 +51,7 @@ class PhpGeneratorDumper extends GeneratorDumper { $methods = array(); - foreach ($this->routes->getRoutes() as $name => $route) { + foreach ($this->routes->all() as $name => $route) { $compiledRoute = $route->compile(); $variables = str_replace("\n", '', var_export($compiledRoute->getVariables(), true)); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 07c6c2296f..f9a53c6b67 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -41,7 +41,7 @@ class ApacheMatcherDumper extends MatcherDumper $regexes = array(); - foreach ($this->routes->getRoutes() as $name => $route) { + foreach ($this->routes->all() as $name => $route) { $compiledRoute = $route->compile(); // Apache "only" supports 9 variables diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index a0637ab453..51ca7aa53b 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -51,7 +51,7 @@ class PhpMatcherDumper extends MatcherDumper { $code = array(); - foreach ($this->routes->getRoutes() as $name => $route) { + foreach ($this->routes->all() as $name => $route) { $compiledRoute = $route->compile(); $conditions = array(); diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index 83654e9ffe..6e91b8b6c1 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -52,7 +52,7 @@ class UrlMatcher implements UrlMatcherInterface { $url = $this->normalizeUrl($url); - foreach ($this->routes->getRoutes() as $name => $route) { + foreach ($this->routes->all() as $name => $route) { $compiledRoute = $route->compile(); // check HTTP method requirement