Add module routes defined in config.
10877
public function addRoutes()
    {
        list($rulesBefore, $rulesAfter) = $this->collectRoutes();
        Yii::$app->urlManager->addRules($rulesBefore, false);
        Yii::$app->urlManager->addRules($rulesAfter, true);
        //echo'<pre>'.RoutesInfo::showRoutes($this->uniqueId).'</pre>';exit;
    }
1255745
def auto_load_app_modules(self, modules):
        """"""
        for app in apps.get_app_configs():
            for module in modules:
                try:
                    import_module('{}.{}'.format(app.module.__package__, module))
                except ImportError:
                    pass
411697
function addRoutes(routes) {
        if (isReactChildren(routes)) routes = createRoutesFromReactChildren(routes);

        addRoutesToNamedRoutes(routes, Router.namedRoutes);

        Router.routes.push.apply(Router.routes, routes);
      }
1120759
def add_patch(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_PATCH, *args, **kwargs)
1037826
def setup(self, app: web.Application):
        
        if self.app is app:
            raise ValueError('The router is already configured '
                             'for this application')
        self.app = app
        routes = sorted(
            ((r.name, (r, r.url_for().human_repr())) for r in self.routes()),
            key=utils.sort_key)
        exists = set()  # type: Set[str]
        for name, (route, path) in routes:
            if name and name not in exists:
                exists.add(name)
            else:
                name = None
            app.router.add_route(
                route.method, path,
                route.handler, name=name)
587875
protected function initializeModules() {
		self::$modules = Configuration::modules( $this->settings );
		self::$actions = Configuration::actions( self::$modules );

		foreach ( self::$modules as $module ) {
			$module->_initialize();
		}
	}
512727
def add_middleware(self, middleware):
        """"""
        if self.middleware is None:
            self._middleware = []
        self.middleware.append(middleware)
12078
def insert_paths(self):
        
        if self.args.path:
            sys.path.insert(0, self.args.path)

        if hasattr(self.config.application, config.PATHS):
            if hasattr(self.config.application.paths, config.BASE):
                sys.path.insert(0, self.config.application.paths.base)
674587
function generate_routes(dir_name, controller, routes) {
	let route_def = cli.cat(dir_name + '/config/routes.js');
	let lines = [], line;
	let method, path, action;

	routes.forEach((route) => {
		// set parameters
		method = route.method; path = route.path;
		controller = route.controller; action = route.action;
		// create and add line
		line = `		this.${method}('${path}', '${controller}#${action}');`;
		lines.push(line);
	});
	// add lines to config file
	route_def = route_def.replace(/use\s?\(\)\s?{/, `use() {
${lines.join('\n')}${route_def.match(/use\s?\(\)\s?{\s*}/) ? '' : '\n'}`);
	fs.writeFileSync(dir_name + '/config/routes.js', route_def);
}
1215994
protected function registerRouteActions()
    {
        // Actions for page routing.
        $this->action->add('load-toplevel_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('load-admin_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('load-'.$this->findParentHook().'_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('admin_init', [$this, 'parsePostRoute']);

        $this->filter->add('admin_title', [$this, 'handleTitle']);
    }
411491
def add(self, method, path_settings, target):
        
        self.routes.append(Route(method, path_settings, target))
        return
187962
def call_modules(auto_discover=()):
    
    for app in settings.INSTALLED_APPS:
        modules = set(auto_discover)
        if app in INSTALLED_APPS_REGISTER:
            modules.update(INSTALLED_APPS_REGISTER[app])
        for module in modules:
            mod = import_module(app)
            try:
                import_module('%s.%s' % (app, module))
                inst = getattr(mod, '__install__', lambda: None)
                inst()
            except:
                if module_has_submodule(mod, module):
                    raise
    app_modules_loaded.send(sender=None)
608435
public function loadConfig()
    {
        $fileName = File::path(dirname($this->getPath()), 'config/config.php');
        if(is_file($fileName))
        {
            Config::addConfig('@' . $this->moduleName, include $fileName);
        }
    }
1338538
def assign_routes(self, app):
        """"""
        for grp in self.filters:
            for f in self.filters[grp]:
                if f.route_func:
                    f.register_route(app)

        for c in self.charts:
            if c.route_func:
                c.register_route(app)
627153
def add_options(self, path: str, handler: _WebHandler,
                    **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_OPTIONS, path, handler, **kwargs)
776408
private function setCustomRoutesFromConfig()
    {
        // we be checkin' our instruction fer configgered routes
        $configgeration = Registry::ahoy()->get('routes');

        // stick some voodoo pins in the map
        foreach ($configgeration as $route => $options) {
            // add the route t' the map
            $this->routes[] = new Route($route, $options);
        }
    }
48531
protected function registerRouteBindings()
    {
        Routes\Admin\PostsRoutes::bindings();
        Routes\Admin\CategoriesRoutes::bindings();
        Routes\Admin\TagsRoutes::bindings();
    }