function CompiledUrlGeneratorDumper::getCompiledRoutes
1 call to CompiledUrlGeneratorDumper::getCompiledRoutes()
- CompiledUrlGeneratorDumper::generateDeclaredRoutes in vendor/
symfony/ routing/ Generator/ Dumper/ CompiledUrlGeneratorDumper.php - 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 27
Class
- CompiledUrlGeneratorDumper
- CompiledUrlGeneratorDumper creates a PHP array to be used with CompiledUrlGenerator.
Namespace
Symfony\Component\Routing\Generator\DumperCode
public function getCompiledRoutes() : array {
$compiledRoutes = [];
foreach ($this->getRoutes()
->all() as $name => $route) {
$compiledRoute = $route->compile();
$compiledRoutes[$name] = [
$compiledRoute->getVariables(),
$route->getDefaults(),
$route->getRequirements(),
$compiledRoute->getTokens(),
$compiledRoute->getHostTokens(),
$route->getSchemes(),
[],
];
}
return $compiledRoutes;
}