dumper = $dumper; } /** * Rebuilds the route info and dumps to dumper. */ public function rebuild() { // We need to manually call each module so that we can know which module // a given item came from. foreach (module_implements('route_info') as $module) { $routes = call_user_func($module . '_route_info'); drupal_alter('router_info', $routes, $module); $this->dumper->addRoutes($routes); $this->dumper->dump(array('route_set' => $module)); } } }