function StaticPrefixCollection::populateCollection
Linearizes back a set of nested routes into a collection.
File
-
vendor/
symfony/ routing/ Matcher/ Dumper/ StaticPrefixCollection.php, line 125
Class
- StaticPrefixCollection
- Prefix tree of routes preserving routes order.
Namespace
Symfony\Component\Routing\Matcher\DumperCode
public function populateCollection(RouteCollection $routes) : RouteCollection {
foreach ($this->items as $route) {
if ($route instanceof self) {
$route->populateCollection($routes);
}
else {
$routes->add(...$route);
}
}
return $routes;
}