Loads bundles routes into application's router.
4942
public function loadBundlesRoutes()
    {
        $loadedBundles = array_keys($this->container->findTaggedServiceIds('bundle.config'));
        foreach ($loadedBundles as $serviceId) {
            $config = $this->container->get($serviceId);
            $recipes = $this->getLoaderRecipesByConfig($config);

            $this->loadRoutes($config, $this->getCallbackFromRecipes($recipes, self::ROUTE_RECIPE_KEY));
        }
    }
702580
protected function loadAnnotatedRoutes()
    {
        if ($this->app->environment('local') && $this->scanWhenLocal)
        {
            $this->scanRoutes();
        }

        if ( ! empty($this->scanRoutes) && $this->finder->routesAreScanned())
        {
            $this->loadScannedRoutes();
        }
    }
253539
function (args) {
            var subModules = args.subModules;
            this._rootModule.loadModules(args.pageId, subModules, args.cb);
        }
48018
def routes(rails_router)
      load!
      Router.new(router: rails_router, namespaces: namespaces).apply
    end
104193
protected function loadRoutes()
    {
        if ($this->eye->laravelVersionIs('>=', '5.4.0')) {
            Route::aliasMiddleware('eyewitness_auth', Authenticate::class);
        } else {
            Route::middleware('eyewitness_auth', Authenticate::class);
        }

        if (! $this->app->routesAreCached()) {
            require __DIR__.'/../routes/web.php';
            require __DIR__.'/../routes/assets.php';
            require __DIR__.'/../routes/api.php';
            require __DIR__.'/../routes/auth.php';
        }
    }
197707
function loadInlineCss(rootDir, apps) {
    _.each(apps, function (app, appName) {
        _.each(app.routes, function (route) {
            var filePath = rootDir + '/app/' + appName + '/inline/' + route.name + '.css';
            if (route.inline && fs.existsSync(filePath)) {
                inlineCssCache[appName + '||' + route.name] = fs.readFileSync(filePath, { encoding: 'utf8' });
            }
        });
    });
}
553841
public static function routes($bundle)
	{
		if (static::routed($bundle)) return;

		$path = static::path($bundle).'routes'.EXT;

		// By setting the bundle property on the router, the router knows what
		// value to replace the (:bundle) place-holder with when the bundle
		// routes are added, keeping the routes flexible.
		Router::$bundle = static::option($bundle, 'handles');

		if ( ! static::routed($bundle) and file_exists($path))
		{
			static::$routed[] = $bundle;

			require $path;
		}
	}
451013
static public function load()
    {
        if (!self::$helpersLoaded) {
            if (($router = Rails::application()->dispatcher()->router()) && ($route = $router->route())) {
                $controllerHelper = Rails::services()->get('inflector')->camelize($route->controller()) . 'Helper';
                array_unshift(self::$appQueue, $controllerHelper);
            }
            $appHelper = 'ApplicationHelper';
            array_unshift(self::$appQueue, $appHelper);
            
            foreach (array_unique(self::$appQueue) as $name) {
                self::loadHelper($name);
            }
            foreach (array_unique(self::$queue) as $name) {
                self::loadHelper($name, true);
            }
            
            # Add base helper
            self::$helpers[self::BASE_HELPER_NAME] = new Helper\Base();
            
            self::$helpersLoaded = true;
        }
    }
885060
public function loadRoutes()
    {
        $packageName = $this->getPackageName();

        foreach (Config::get('amethyst.'.$packageName.'.http') as $groupName => $group) {
            foreach ($group as $configName => $config) {
                if (Arr::get($config, 'enabled')) {
                    Router::group($groupName, Arr::get($config, 'router'), function ($router) use ($config) {
                        $controller = Arr::get($config, 'controller');

                        $reflection = new \ReflectionClass($controller);

                        if ($reflection->hasMethod('index')) {
                            $router->get('/', ['as' => 'index', 'uses' => $controller.'@index']);
                        }

                        if ($reflection->hasMethod('store')) {
                            $router->put('/', ['as' => 'store', 'uses' => $controller.'@store']);
                        }

                        if ($reflection->hasMethod('erase')) {
                            $router->delete('/', ['as' => 'erase', 'uses' => $controller.'@erase']);
                        }

                        if ($reflection->hasMethod('create')) {
                            $router->post('/', ['as' => 'create', 'uses' => $controller.'@create']);
                        }

                        if ($reflection->hasMethod('update')) {
                            $router->put('/{id}', ['as' => 'update', 'uses' => $controller.'@update']);
                        }

                        if ($reflection->hasMethod('remove')) {
                            $router->delete('/{id}', ['as' => 'remove', 'uses' => $controller.'@remove']);
                        }

                        if ($reflection->hasMethod('show')) {
                            $router->get('/{id}', ['as' => 'show', 'uses' => $controller.'@show']);
                        }
                    });
                }
            }
        }
    }
369137
private Set<String> getResourcePaths(List<JoinableResourceBundle> bundles) {

		Set<String> resourcePaths = new HashSet<>();

		for (JoinableResourceBundle bundle : bundles) {
			for (BundlePath bundlePath : bundle.getItemPathList()) {
				resourcePaths.add(bundlePath.getPath());
			}
		}

		return resourcePaths;
	}
650030
@Override
	public void renderBundleLinks(String requestedPath, BundleRendererContext ctx, Writer out) throws IOException {

		boolean debugOn = bundler.getConfig().isDebugModeOn();
		JoinableResourceBundle bundle = bundler.resolveBundleForPath(requestedPath);

		if (null == bundle) {

			LOGGER.warn("No bundle found for path : " + requestedPath);
			return;
		}

		// If the global bundles had been added before, it will not be included
		// again.
		if (!ctx.isGlobalBundleAdded()) {
			renderGlobalBundleLinks(ctx, out, debugOn);
		}

		renderBundleLinks(bundle, requestedPath, ctx, out, debugOn, true);

		if (debugOn) {
			addComment("Finished adding members resolved by " + requestedPath, out);
		}
	}
767017
public function loadRoutes()
    {
        $routesJsonFile = $this->configDir . '/routes.json';
        $routesPhpFile = $this->configDir . '/routes.php';
        
        if (file_exists($this->resourcesDir) && file_exists($this->configDir)) {
            if (file_exists($routesJsonFile))
                return json_decode(file_get_contents($routesJsonFile), true);
            elseif (file_exists($routesPhpFile))
                return require_once $routesPhpFile;
        } else {
            return array();
        }
    }
85548
private static Bundle _loadBundle(BundleContext context, String path, InputStream is, boolean closeStream) throws BundleException {
	log(Log.LEVEL_INFO, "add bundle:" + path);

	try {
	    // we make this very simply so an old loader that is calling this still works
	    return context.installBundle(path, is);
	}
	finally {
	    // we make this very simply so an old loader that is calling this still works
	    if (closeStream && is != null) {
		try {
		    is.close();
		}
		catch (Throwable t) {
		    ExceptionUtil.rethrowIfNecessary(t);
		}
	    }
	}
    }
480133
function(options) {

        //Starting app.
        self.appName        = options.bundle;

        self.env            = options.env;
        self.version        = options.version;
        local.router        = new Router(self.env);

        //True => multiple bundles sharing the same server (port).
        self.isStandalone   = options.isStandalone;
        self.executionPath  = options.executionPath;
        self.bundles        = options.bundles;

        if (!self.isStandalone) {
            //Only load the related conf / env.
            self.conf[self.appName] = {};
            self.conf[self.appName][self.env] = options.conf[self.appName][self.env];
            self.conf[self.appName][self.env].bundlesPath = options.conf[self.appName][self.env].bundlesPath;
            self.conf[self.appName][self.env].modelsPath =  options.conf[self.appName][self.env].modelsPath;
            if (!self.conf[self.appName][self.env].server.request) {
                self.conf[self.appName][self.env].server.request = {
                    isXMLRequest: false
                }
            }
        } else {

            //console.log("Running mode not handled yet..", self.appName, " VS ", self.bundles);
            //Load all conf for the related apps & env.
            var apps = self.bundles;
            for (var i=0; i<apps.length; ++i) {
                self.conf[apps[i]] = {};
                self.conf[apps[i]][self.env] = options.conf[apps[i]][self.env];
                self.conf[apps[i]][self.env].bundlesPath = options.conf[apps[i]][self.env].bundlesPath;
                self.conf[apps[i]][self.env].modelsPath = options.conf[apps[i]][self.env].modelsPath;
                if (!self.conf[apps[i]][self.env].server.request) {
                    self.conf[apps[i]][self.env].server.request = {
                        isXMLRequest: false
                    }
                }
            }
        }

        // getting server core config
        var statusCodes = null
            , mime      = null;

        try {
            //var corePath = getPath('gina.core');
            var corePath = getPath('gina').core;
            statusCodes = fs.readFileSync( _( corePath + '/status.codes') ).toString();
            statusCodes = JSON.parse(statusCodes);
            if ( typeof(statusCodes['_comment']) != 'undefined' )
                delete statusCodes['_comment'];

            mime  = fs.readFileSync(corePath + '/mime.types').toString();
            mime  = JSON.parse(mime);
            if ( typeof(mime['_comment']) != 'undefined' )
                delete mime['_comment'];

            self.conf.core.statusCodes  = statusCodes;
            self.conf.core.mime         = mime

        } catch(err) {
            console.error(err.stack||err.message);
            process.exit(1)
        }

        self.emit('configured', false, express(), express, self.conf[self.appName][self.env]);
    }
30170
private static function loadRoutes()
    {
        // Media Manager Routes
        Route::group(['prefix' => config('media-manager.routes.prefix')], function () {
            Route::get('browser/index', '\TalvBansal\MediaManager\Http\Controllers\MediaController@ls');

            Route::post('browser/file', '\TalvBansal\MediaManager\Http\Controllers\MediaController@uploadFiles');
            Route::delete('browser/file', '\TalvBansal\MediaManager\Http\Controllers\MediaController@deleteFile');
            Route::post('browser/folder', '\TalvBansal\MediaManager\Http\Controllers\MediaController@createFolder');
            Route::delete('browser/folder', '\TalvBansal\MediaManager\Http\Controllers\MediaController@deleteFolder');

            Route::post('browser/rename', '\TalvBansal\MediaManager\Http\Controllers\MediaController@rename');
            Route::get('browser/directories', '\TalvBansal\MediaManager\Http\Controllers\MediaController@allDirectories');
            Route::post('browser/move', '\TalvBansal\MediaManager\Http\Controllers\MediaController@move');
        });
    }
176638
def load_controllers
      return unless File.directory?(controllers_path)

      path = File.realpath(controllers_path)
      $LOAD_PATH.unshift(path)
      Dir["#{path}/**/*.rb"].each do |f|
        next if f.include?('_pb') # exclude if people include proto generated files in app/rpc

        logger.info "- Loading gRPC service file: #{f}"
        load File.realpath(f)
      end
    end
164200
private function setupRoutables()
    {
        $app = $this;
        // For now, need to rely on a catch-all...
        $this->get(
            '{catchall:.*}',
            function (
                RequestInterface $request,
                ResponseInterface $response,
                array $args
            ) use ($app) {
                $config = $app->config();
                $routables = $config['routables'];
                if ($routables === null || count($routables) === 0) {
                    return $this['notFoundHandler']($request, $response);
                }
                $routeFactory = $this['route/factory'];
                foreach ($routables as $routableType => $routableOptions) {
                    $route = $routeFactory->create($routableType, [
                        'path' => $args['catchall'],
                        'config' => $routableOptions
                    ]);
                    if ($route->pathResolvable($this)) {
                        $this['logger']->debug(
                            sprintf('Loaded routable "%s" for path %s', $routableType, $args['catchall'])
                        );
                        return $route($this, $request, $response);
                    }
                }

                // If this point is reached, no routable has provided a callback. 404.
                return $this['notFoundHandler']($request, $response);
            }
        );
    }