Initializes the route.
This method is invoked after the route is created by the route manager.
761787
public function init()
    {
        parent::init();
        if ($this->logFile === null) {
            $this->logFile = Yii::$app->getRuntimePath() . '/logs/app.log';
        } else {
            $this->logFile = Yii::getAlias($this->logFile);
        }
        $logPath = dirname($this->logFile);
        if (!is_dir($logPath)) {
            FileHelper::createDirectory($logPath, $this->dirMode, true);
        }
        if ($this->maxLogFiles < 1) {
            $this->maxLogFiles = 1;
        }
        if ($this->maxFileSize < 1) {
            $this->maxFileSize = 1;
        }
    }
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);
        }
    }
1139025
public function init()
    {
        if ($this->runEvent) {
            $chain = new jsChain();
            $this->app->html->js(true, $chain->atkServerEvent(
                ['uri' => $this->getUrl()]
            ));
            $this->isRunning = true;
        }

        $this->_initialized = true;
    }
1216916
public function init()
    {
        $this->loadResources();
        $this->prepRequestData();

        // initialize the output component by loading it, the component will register
        // handlers on construction
        $this["output.service"];

        $this["logger.service"]("System")->info("Application initialized");

        $this["hooks.service"]->setParams([$this]);
        $this["hooks.service"]->exec("application.init.after");
    }
1008426
public void init() {
        defaultApplicationRouterParser.init();
        try {
            defaultSipApplicationRouterInfos = defaultApplicationRouterParser.parse();
        } catch (ParseException e) {
            log.fatal("Impossible to parse the default application router configuration file", e);
            throw new IllegalArgumentException("Impossible to parse the default application router configuration file", e);
        }
    }
1257021
public function init()
	{
		if(isset($this->htmlOptions['id']))
			$this->id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$this->id;
		$route=$this->getController()->getRoute();
		$this->items=$this->normalizeItems($this->items,$route,$hasActiveChild);
	}
1318773
public function initialize()
    {
        /**
         * Attaches event fired before view render
         * It allows to use $this->view->partial inside of action method before action view is being rendered
         */
        $this->eventsManager->attach('view:beforeRenderView', function($event, $view, $engineViewPath) {
            if ($view instanceof View) {
                $view->setControllerViewPath($this->router->getControllerName());
            }
        });
    }
495649
public static function initialize() {
		if( static::isInitialized() ) { return; }
		static::$initialized = true;

		$routes = array();

		// TODO: Add cache, but what kind of ?

		static::loadRoutes($routes);

		// Register routes
		foreach( $routes as $type => $typeRoutes ) {
			$routeClass = RequestHandler::getRouteClass($type);
			if( !class_exists($routeClass, true) || !in_array(get_class(), class_parents($routeClass)) ) {
				continue;
			}
			foreach( $typeRoutes as $routeName => $routeConfig ) {
				$routeClass::registerConfig($routeName, $routeConfig);
			}
		}
	}
257681
def init_blueprint(self, blueprint):
        
        if self._route is not None:
            raise TypeError("route cannot be set when using blueprints!")

        blueprint.rak = self
        blueprint.add_url_rule("", view_func=getattr(self, self._view_name), methods=['POST'])
739012
@PostConstruct
    public synchronized void initialize() {
        final FwWebDirection direction = assistWebDirection();
        final SessionResourceProvider provider = direction.assistSessionResourceProvider();
        sessionSharedStorage = prepareSessionSharedStorage(provider);
        httpSessionArranger = prepareHttpSessionArranger(provider);
        showBootLogging();
    }
824326
public function initializeRoutingTable()
    {
        $routes = $this->routeObjectBackend->loadObject();
        if (!is_array($routes)) {
            $routes = array();
        }
        
        $this->routes = $routes;
    }
653625
@PostConstruct
    private void initialize() {
        final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
        final String offset = multiParam(queryParams, "offset");
        final String page = multiParam(queryParams, "page", "pageNumber");
        final String size = multiParam(queryParams, "size", "pageSize", "limit");
        final String filter = multiParam(queryParams, "filter", "searchText");
        final String sort = multiParam(queryParams, "sort", "sortOrder");
        final OrderDirection orderDirection;
        String orderBy = multiParam(queryParams, "orderBy", "sortName");

        if (StringUtils.isBlank(orderBy) || !RegexSequence.Pattern.ALPHA_NUMERIC.matcher(orderBy).matches()) {
            orderBy = null;
        }

        if ("asc".equalsIgnoreCase(sort)) {
            orderDirection = OrderDirection.ASCENDING;
        } else if ("desc".equalsIgnoreCase(sort)) {
            orderDirection = OrderDirection.DESCENDING;
        } else {
            orderDirection = OrderDirection.UNSPECIFIED;
        }

        final Pagination pagination;
        if (StringUtils.isNotBlank(offset)) {
            pagination = new Pagination(Pagination.Strategy.OFFSET, offset, size);
        } else if (StringUtils.isNotBlank(page) && StringUtils.isNotBlank(size)) {
            pagination = new Pagination(Pagination.Strategy.PAGES, page, size);
        } else {
            pagination = new Pagination(Pagination.Strategy.OFFSET, 0, 100); // Always paginate queries from resources
        }
        this.alpineRequest = new AlpineRequest(getPrincipal(), pagination, filter, orderBy, orderDirection);
    }
537736
public void initialize(OnNavigationReadyCallback onNavigationReadyCallback) {
    this.onNavigationReadyCallback = onNavigationReadyCallback;
    if (!isMapInitialized) {
      mapView.getMapAsync(this);
    } else {
      onNavigationReadyCallback.onNavigationReady(navigationViewModel.isRunning());
    }
  }
1027506
public function afterRegistry()
    {
        parent::afterRegistry();

        $this->routeController = $this->request->getControllerName();
        $this->routeAction     = $this->request->getActionName();

        if ($this->loginStatusTracker->hasUser()) {
            $this->user = $this->loginStatusTracker->getUser();
        }
    }
148141
protected function _init() {
		parent::_init();
		$router = $this->_classes['router'];

		if ($this->_config['location']) {
			$location = $router::match($this->_config['location'], $this->_config['request']);
			$this->headers('Location', $location);
		}
	}
706227
public static function route() :void {

		// marker
		Profiler::setMarker('Router.route', 'framework');
		// get the requested url
		$request_url = Request::getUrl();
		// get the requested method
		$request_method = Request::getMethod();
		// Loop over each route and test to see if they are valid
		foreach(self::$_routes as $route) {
			// if the route matches
			if(self::routeMatch($request_url, $request_method, $route)) {
				// get it
				$matching_route = $route;
				// stop trying
				break;
			}
		}
		// marker
		Profiler::releaseMarker('Router.route');
		// if no match is found and we don't have an error route to fallback on
		if(!isset($matching_route)) {
			// throw a native exception since there is no cleaner alternative
			Throw new Exception('Router::route() no matching route', 404);
		}
		// send the matching route to the dispatcher
		self::forward($matching_route);	
		
	}
965975
final protected function initRoutes()
    {
        $routes = $this->setRoutes();
        foreach ($routes as $currentRoutes) {
            foreach ($currentRoutes as $route) {
                $this->container->addRoute($route);
            }
        }
        
        return $this;
    }