Gets the RouteCollection instance associated with this Router.
RouteCollection A RouteCollection instance
Overrides RouterInterface::getRouteCollection
public function getRouteCollection() {
if (!$this->routeCollection instanceof RouteCollection) {
$this->routeCollection = new RouteCollection();
foreach ($this
->all() as $router) {
$this->routeCollection
->addCollection($router
->getRouteCollection());
}
}
return $this->routeCollection;
}