system/classes/Route.php
protected function setPath($url)
    {
        // Removes any GET data from the url.
        // Makes 'mysite.com/websites/build/?somevalue=test' INTO '/websites/build'
        $cleanURI = str_replace('?'.$_SERVER['QUERY_STRING'], '', $url);

        // Removes the 'mysite.com' from 'mysite.com/controller/method/id/'
        // Resulting pathString will be 'controller/method/id/'
        $this->pathString = explode($this->config['site_url'], $cleanURI, 2)[1];

        // If config option to make url lowercase is true
        if ($this->config['lowercase_url']) {
            $this->pathString = strtolower($this->pathString);
        }

        // Setup Path array
        $this->path = explode('/', $this->pathString);
    }
protected function setPath($url)
    {
        // Removes any GET data from the url.
        // Makes 'mysite.com/websites/build/?somevalue=test' INTO '/websites/build'
        $cleanURI = str_replace('?'.$_SERVER['QUERY_STRING'], '', $url);

        // Removes the 'mysite.com' from 'mysite.com/controller/method/id/'
        // Resulting pathString will be 'controller/method/id/'
        $this->pathString = explode($this->config['site_url'], $cleanURI, 2)[1];

        // If config option to make url lowercase is true
        if ($this->config['lowercase_url']) {
            $this->pathString = strtolower($this->pathString);
        }

        // Setup Path array
        $this->path = explode('/', $this->pathString);
    }
protected function setPath ( $ url ) { // Removes any GET data from the url. // Makes 'mysite.com/websites/build/?somevalue=test' INTO '/websites/build' $ cleanURI = str_replace ( '?' . $ _SERVER [ 'QUERY_STRING' ] , '' , $ url ) ; // Removes the 'mysite.com' from 'mysite.com/controller/method/id/' // Resulting pathString will be 'controller/method/id/' $ this -> pathString = explode ( $ this -> config [ 'site_url' ] , $ cleanURI , 2 ) [ 1 ] ; // If config option to make url lowercase is true if ( $ this -> config [ 'lowercase_url' ] ) { $ this -> pathString = strtolower ( $ this -> pathString ) ; } // Setup Path array $ this -> path = explode ( '/' , $ this -> pathString ) ; }
Given a URL, sets needed PATH information.
This must be executed before routeFind as it sets the needed pathString var.

NOTE: $_SERVER['QUERY_STRING'] is set by the server and may not be available
depending on the server being used.
Given a URL sets needed PATH information . This must be executed before routeFind as it sets the needed pathString var .