public function getRequestRoute()
    {
        if ($this->_requestRoute !== null) {
            return $this->_requestRoute;
        }
        
        if ($this->_defaultRoute !== null && empty($this->getSuffix())) {
            $array = $this->_defaultRoute;
        } else {
            // parse request against urlManager
            $route = $this->urlManager->parseRequest($this->request);
            // return human readable array
            $array = [
                'route' => $route[0],
                'args' => $route[1],
                'originalArgs' => $route[1],
            ];
        }
        // resolve the current route by the module
        $array['route'] = $this->module->resolveRoute($array['route']);

        // if there are no arguments, all get params are assigned. In order to use the original arguments from parse request use `originalArgs` instead of `args`.
        if (empty($array['args'])) {
            $array['args'] = $this->request->get();
        }
        
        // @see https://github.com/luyadev/luya/issues/1267
        if ($this->_defaultRoute !== null) {
            $array['args'] = array_merge($this->_defaultRoute['args'], $array['args']);
        }

        $this->_requestRoute = $array;
        
        return $array;
    }
public function getRequestRoute()
    {
        if ($this->_requestRoute !== null) {
            return $this->_requestRoute;
        }
        
        if ($this->_defaultRoute !== null && empty($this->getSuffix())) {
            $array = $this->_defaultRoute;
        } else {
            // parse request against urlManager
            $route = $this->urlManager->parseRequest($this->request);
            // return human readable array
            $array = [
                'route' => $route[0],
                'args' => $route[1],
                'originalArgs' => $route[1],
            ];
        }
        // resolve the current route by the module
        $array['route'] = $this->module->resolveRoute($array['route']);

        // if there are no arguments, all get params are assigned. In order to use the original arguments from parse request use `originalArgs` instead of `args`.
        if (empty($array['args'])) {
            $array['args'] = $this->request->get();
        }
        
        // @see https://github.com/luyadev/luya/issues/1267
        if ($this->_defaultRoute !== null) {
            $array['args'] = array_merge($this->_defaultRoute['args'], $array['args']);
        }

        $this->_requestRoute = $array;
        
        return $array;
    }
public function getRequestRoute ( ) { if ( $ this -> _requestRoute !== null ) { return $ this -> _requestRoute ; } if ( $ this -> _defaultRoute !== null && empty ( $ this -> getSuffix ( ) ) ) { $ array = $ this -> _defaultRoute ; } else { // parse request against urlManager $ route = $ this -> urlManager -> parseRequest ( $ this -> request ) ; // return human readable array $ array = [ 'route' => $ route [ 0 ] , 'args' => $ route [ 1 ] , 'originalArgs' => $ route [ 1 ] , ] ; } // resolve the current route by the module $ array [ 'route' ] = $ this -> module -> resolveRoute ( $ array [ 'route' ] ) ; // if there are no arguments, all get params are assigned. In order to use the original arguments from parse request use `originalArgs` instead of `args`. if ( empty ( $ array [ 'args' ] ) ) { $ array [ 'args' ] = $ this -> request -> get ( ) ; } // @see https://github.com/luyadev/luya/issues/1267 if ( $ this -> _defaultRoute !== null ) { $ array [ 'args' ] = array_merge ( $ this -> _defaultRoute [ 'args' ] , $ array [ 'args' ] ) ; } $ this -> _requestRoute = $ array ; return $ array ; }
Determine the default route based on current defaultRoutes or parsedRequested by the UrlManager.

@return array An array with
+ route: The path/route to the controller
+ args: If the url has no params, it returns all params from get request.
+ originalArgs: The arguments (params) parsed from the url trogh url manager

@see Related problems and changes:
+ https://github.com/luyadev/luya/issues/1885
+ https://github.com/luyadev/luya/issues/1267
+ https://github.com/luyadev/luya/issues/754
Determine the default route based on current defaultRoutes or parsedRequested by the UrlManager .