public function addGroup(RouteGroup $group) { foreach ($group->getRoutes() as $route) { $this->routes[] = $route; } $this->groups[] = $group; }