Initialize the routes
504754
function route() {
        configure()

        middlewares()

        for (let route of config.routes) {
            if (route.type === 'view')
                server[route.method](route.src, (req, res) => {
                    res.render(`${app.root}/views/${route.dest}.twig`, {})
                })

            if (route.type === 'controller') {
                let [path, method] = route.dest.split('::')

                let controller = function () {
                    if (!app.controllers)
                        return require(`${app.root}/controllers/${path.replace('.', '/')}`)(app)

                    if (path.split('.').length > 1)
                        return app.controllers[path.split('.')[0]][path.split('.')[1]]
                    else
                        return app.controllers[path]
                }()

                let func = wrapper(controller[method])
                if (!func)
                    app.drivers.logger.error('blockbase-express - wrapper', `Undefined function ${controller}${method}`)

                if (route.method === 'post' || route.method === 'put')
                    server[route.method](route.src, upload.any(), func)
                else
                    server[route.method](route.src, func)
            }
        }

        errors()
    }
181065
protected function init(){
		//time of construct...
		$starttime = explode(' ', microtime());
		self::$starttime = $starttime[1] + $starttime[0];
		//
		$this->router=array();
		}
1260206
public function initialize()
    {
        parent::initialize();

        $attributes = Request::all();
        array_unshift($attributes, $this->getName());
        array_unshift($attributes, $this->getModelConfiguration()->getAlias());

        $this->setHtmlAttribute('style', 'width:100%');
        $this->setHtmlAttribute('data-url', route('admin.display.async', $attributes));
        $this->setHtmlAttribute('data-payload', json_encode($this->payload));

        if ($this->getDisplaySearch()) {
            $this->setHtmlAttribute('data-display-search', 1);
        }

        if ($this->getDisplayLength()) {
            $this->setHtmlAttribute('data-display-dtlength', 1);
        }
    }
1020940
protected static function _init()
    {
        self::$_routeTypes = [
            self::TYPE_DEFAULT_ROUTE => __d('wasabi_core', 'Default'),
            self::TYPE_REDIRECT_ROUTE => __d('wasabi_core', 'Redirect')
        ];

        self::$_initialized = true;
    }
326038
protected function loadRoutes()
    {
        if (($routes = $this->app['config']['http.routes']) == null) {
            return;
        }

        $router = $this->app['router'];

        $namespace = $this->getNamespace();

        foreach ($routes as $route) {
            if ($route instanceof Closure) {
                // We can defined routes with a Closure.
                call_user_func($route, $router);

                continue;
            }

            $attributes = $this->normalizeRouteAttributes($route);

            $filePath = array_pull($attributes, 'path');

            if ($namespace) {
                $attributes['namespace'] = $this->getGroupRouteNamespace($namespace, $attributes);
            }

            if (file_exists($filePath)) {
                $router->group($attributes, function ($router) use ($filePath) {
                    include $filePath;
                });
            }
        }
    }
732397
protected function initRoutes()
    {
        if (isset($this->settings) && $this->settings->exists('routes') || !self::$init_stages[$this->name]['routes']) {

            $routes = $this->settings->get('routes');

            // Get uncamelized app name
            $string = new CamelCase($this->name);
            $app = $string->uncamelize();

            // Add always a missing index route!
            if (!array_key_exists('index', $routes)) {
                $routes['index'] = [];
            }

            foreach ($routes as $name => $definition) {

                if (is_numeric($name)) {
                    Throw new AppException(sprintf('AbstractApp "%s" sent a nameless route to be mapped.', $this->name));
                }

                $definition = $this->parseRouteDefintion($name, $definition);

                $this->core->router->map($definition['method'], $definition['route'], $definition['target'], $definition['name']);
            }

            self::$init_stages[$this->name]['routes'] = true;
        }
    }
109928
private static void prepareRoutes() {
        injector.getInstance(MangooBootstrap.class).initializeRoutes();
        
        Router.getRequestRoutes().forEach((RequestRoute requestRoute) -> {
            if (!methodExists(requestRoute.getControllerMethod(), requestRoute.getControllerClass())) {
                LOG.error("Could not find controller method '{}' in controller class '{}'", requestRoute.getControllerMethod(), requestRoute.getControllerClass());
                failsafe();
            }
            
            if (requestRoute.hasAuthorization() && (!MangooUtils.resourceExists(Default.MODEL_CONF.toString()) || !MangooUtils.resourceExists(Default.POLICY_CSV.toString()))) {
                LOG.error("Route on method '{}' in controller class '{}' requires authorization, but either model.conf or policy.csv is missing", requestRoute.getControllerMethod(), requestRoute.getControllerClass());
                failsafe();
            } 
        });
    }
583795
public function init()
    {
        $this->routes = $this->routes->getRouteCollections();

        $this->dispatcher = $this->createDispatcher();

        $this->currentURL = $this->request->getPathInfo();

        $this->dispatch();
    }
438556
public function initialize()
    {
        if ($this->hasMiddlewares()) {
            foreach ($this->middlewares as $middleware) {
                $middleware->initialize();
            }

            Strata::app()->log(sprintf("Loaded <info>%d</info> middlewares", count($this->middlewares)), "<info>Middleware</info>");
        }
    }
902832
private function buildRoutes(): void
    {
        if ($this->loaded['routes']) {
            return;
        }

        $this->loaded['routes'] = true;

        $this->routes = new RouteCollection(
            $this->getBaseCodeRoute(),
            $this->getBaseRouteName(),
            $this->getBaseRoutePattern(),
            $this->getBaseControllerName()
        );

        $this->routeBuilder->build($this, $this->routes);

        $this->configureRoutes($this->routes);

        foreach ($this->getExtensions() as $extension) {
            $extension->configureRoutes($this, $this->routes);
        }
    }
671460
public function init()
    {
        $config = $this->grav['config'];
        $this->ignore_files = $config->get('system.pages.ignore_files');
        $this->ignore_folders = $config->get('system.pages.ignore_folders');
        $this->ignore_hidden = $config->get('system.pages.ignore_hidden');

        $this->instances = [];
        $this->children = [];
        $this->routes = [];

        if (!$this->check_method) {
            $this->setCheckMethod($config->get('system.cache.check.method', 'file'));
        }

        $this->buildPages();
    }
313534
protected function performInit()
    {
        /** @var RouteHelperInterface $routeHelper */
        $routeHelper = app(RouteHelperInterface::class);

        $this->routePrefix = $routeHelper->getRouteNameForModelClass($this->modelClass, true);

        $permissions = $this->actionData->permissions();

        if (empty($permissions)) {
            $this->isPermitted = true;
        } else {
            $this->isPermitted = cms_auth()->can($permissions);
        }
    }
793017
protected function performInit()
    {
        $this->prepareTargetRoute()
             ->prepareParentParameter()
             ->checkForMorphToRelation();


        // Check permissions
        $permissions = $this->actionData->permissions();

        if (empty($permissions)) {
            $this->isPermitted = true;
        } else {
            $this->isPermitted = cms_auth()->can($permissions);
        }
    }
694623
protected function init()
    {
        $this->query = new Query();
        $this->post = new Post();
        $this->payload = new Payload();
        $this->server = new Server();
        $this->files = new Files();
        $this->env = new Env();
        $this->headers = new Headers();
    }
818900
private void initialise() {
    try {
      addTrafficSource();
      addTrafficLayers();
    } catch (Exception exception) {
      Timber.e(exception, "Unable to attach Traffic to current style: ");
    } catch (UnsatisfiedLinkError error) {
      Timber.e(error, "Unable to load native libraries: ");
    }
  }
154523
public function init()
	{
		parent::init();
		foreach($this->_routes as $name=>$route)
		{
			$route=Yii::createComponent($route);
			$route->init();
			$this->_routes[$name]=$route;
		}
		Yii::getLogger()->attachEventHandler('onFlush',array($this,'collectLogs'));
		Yii::app()->attachEventHandler('onEndRequest',array($this,'processLogs'));
	}
490341
private function loadRouteRules()
    {
        foreach ($this->rules['routeRules'] as $routeAlias => $routeRuleSets) {
            $resourceId = call_user_func_array($this->config['routeResourceGenerator'], [$routeAlias]);
            $this->acl->addResource(new Resource($resourceId));
            foreach ($routeRuleSets as $ruleSet) {
                $this->enforceRuleset($ruleSet, ['resources' => $resourceId, 'privileges' => $this->config['routePrivilege']]);
            }
        }
    }