luya\base\ModuleReflection::getRequestRoute PHP Method

getRequestRoute() public method

Determine the default route based on current defaultRoutes or parsedRequested by the UrlManager.
public getRequestRoute ( ) : array
return array
    public function getRequestRoute()
    {
        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]];
        }
        // resolve the current route by the module
        $array['route'] = $this->module->resolveRoute($array['route']);
        // overload args if none defined with massiv get assigment
        if (count($array['args']) === 0) {
            /**
             * issue: https://github.com/zephir/luya/issues/754
             *
             * 01.02.2016: we have to remove the get param overloading, otherwhise we can not guarnte
             * to re generate the current url rule. Have to verify why in which case this was needed.
             *
             * original: $array['args'] = $this->request->get();
             * new: do not overload: $array['args'] = [];
             */
            $array['args'] = [];
        }
        return $array;
    }