public function RouteCollection::all

Returns all routes in this collection and its children.

Return value

array An array of routes

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php, line 132

Class

RouteCollection
A RouteCollection represents a set of Route instances as a tree structure.

Namespace

Symfony\Component\Routing

Code

public function all() {
  $routes = array();
  foreach ($this->routes as $name => $route) {
    if ($route instanceof RouteCollection) {
      $routes = array_merge($routes, $route
        ->all());
    }
    else {
      $routes[$name] = $route;
    }
  }
  return $routes;
}