function CompiledUrlGeneratorDumper::generateDeclaredRoutes
Generates PHP code representing an array of defined routes together with the routes properties (e.g. requirements).
File
-
vendor/
symfony/ routing/ Generator/ Dumper/ CompiledUrlGeneratorDumper.php, line 108
Class
- CompiledUrlGeneratorDumper
- CompiledUrlGeneratorDumper creates a PHP array to be used with CompiledUrlGenerator.
Namespace
Symfony\Component\Routing\Generator\DumperCode
private function generateDeclaredRoutes() : string {
$routes = '';
foreach ($this->getCompiledRoutes() as $name => $properties) {
$routes .= \sprintf("\n '%s' => %s,", $name, CompiledUrlMatcherDumper::export($properties));
}
foreach ($this->getCompiledAliases() as $alias => $properties) {
$routes .= \sprintf("\n '%s' => %s,", $alias, CompiledUrlMatcherDumper::export($properties));
}
return $routes;
}