Bluz\Router\Router::processRoute PHP Метод

processRoute() защищенный Метод

Default routers examples :module/ :module/:controller/ :module/:controller/:key1/:value1/:key2/:value2...
protected processRoute ( ) : boolean
Результат boolean
    protected function processRoute()
    {
        $uri = $this->getCleanUri();
        $uri = trim($uri, '/');
        $raw = explode('/', $uri);
        // rewrite module from request
        if (sizeof($raw)) {
            $this->setParam('_module', array_shift($raw));
        }
        // rewrite module from controller
        if (sizeof($raw)) {
            $this->setParam('_controller', array_shift($raw));
        }
        if ($size = sizeof($raw)) {
            // save raw
            $this->rawParams = $raw;
            // save as index params
            foreach ($raw as $i => $value) {
                $this->setParam($i, $value);
            }
            // remove tail
            if ($size % 2 == 1) {
                array_pop($raw);
                $size = sizeof($raw);
            }
            // or use array_chunk and run another loop?
            for ($i = 0; $i < $size; $i = $i + 2) {
                $this->setParam($raw[$i], $raw[$i + 1]);
            }
        }
        return true;
    }