src/Router.php
private function createRoute(): void
    {
        $this->virtualArgs = [];
        $this->realArgs = \explode('/', $this->url);

        do {
            if ($this->setMainController(
                $this->routingBasePath . implode('/', $this->realArgs)
            )) return;

            array_unshift($this->virtualArgs, array_pop($this->realArgs));
        }
        while (count($this->realArgs) > 0);

        throw new NoControllerFoundException();
    }
private function createRoute(): void
    {
        $this->virtualArgs = [];
        $this->realArgs = \explode('/', $this->url);

        do {
            if ($this->setMainController(
                $this->routingBasePath . implode('/', $this->realArgs)
            )) return;

            array_unshift($this->virtualArgs, array_pop($this->realArgs));
        }
        while (count($this->realArgs) > 0);

        throw new NoControllerFoundException();
    }
private function createRoute ( ) : void { $ this -> virtualArgs = [ ] ; $ this -> realArgs = \ explode ( '/' , $ this -> url ) ; do { if ( $ this -> setMainController ( $ this -> routingBasePath . implode ( '/' , $ this -> realArgs ) ) ) return ; array_unshift ( $ this -> virtualArgs , array_pop ( $ this -> realArgs ) ) ; } while ( count ( $ this -> realArgs ) > 0 ) ; throw new NoControllerFoundException ( ) ; }
Calculate the route and route parameters.

@throws NoControllerFoundException if no route maps to a main controller
@return void
Calculate the route and route parameters .