diff --git a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php index fe3c7b78a5f7..e55835c0c3dc 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -51,7 +51,6 @@ protected function addGenerator() { $methods = array(); $routes = array(); - foreach ($this->routes->all() as $name => $route) { $compiledRoute = $route->compile(); @@ -69,17 +68,19 @@ protected function get{$name}RouteInfo() EOF ; - $routes[$name] = true; + $routes[] = " '$name' => true,"; } $methods = implode("\n", $methods); - $routes = $this->exportParameters($routes); + $routes = implode("\n", $routes); return << $value) { - if (is_array($value)) { - $value = $this->exportParameters($value, $indent + 4); - } else { - $value = var_export($value, true); - } - - $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), var_export($key, true), $value); - } - - return sprintf("array(\n%s\n%s)", implode("\n", $php), str_repeat(' ', $indent - 4)); - } }