system/classes/Route.php
public function routeProcess($uri = false, $httpMethod = false)
    {
        // Set Request type.
        if (!$httpMethod) $httpMethod = $_SERVER['REQUEST_METHOD'];
        $this->httpMethod = $httpMethod;

        // Set PATH info.
        if (!$uri) $uri = $_SERVER['REQUEST_URI'];
        $this->setPath($uri);

        // BIG IDEA: routeFind() must be called to populate needed Controller and Method variables. 
        //
        // If a custom route is found, routeFind() still needs to be called to populate 
        // data member variables and complete the mapping from URI to a Controller file.
        //
        // If custom route is not set, but automatic routing is enabled, also call routeFind
        // to see if an automatic route exists.
        $customPathSearch = $this->customFind();
        if ($customPathSearch || (!$customPathSearch && $this->config['automatic_routing'])) {
            $this->routeFind();
        } 

        // If a route was found, but access was denied via the preExec callback...
        else if ($customPathSearch == -1) {
            $this->error('403');
        }

        // ELSE
        // Do nothing if there's no match. When and if routeExec is called user will be 
        // directed to 404. But until then, developers can use the exists() method to 
        // check different routes and possibly redirect the user somewhere else.
    }
public function routeProcess($uri = false, $httpMethod = false)
    {
        // Set Request type.
        if (!$httpMethod) $httpMethod = $_SERVER['REQUEST_METHOD'];
        $this->httpMethod = $httpMethod;

        // Set PATH info.
        if (!$uri) $uri = $_SERVER['REQUEST_URI'];
        $this->setPath($uri);

        // BIG IDEA: routeFind() must be called to populate needed Controller and Method variables. 
        //
        // If a custom route is found, routeFind() still needs to be called to populate 
        // data member variables and complete the mapping from URI to a Controller file.
        //
        // If custom route is not set, but automatic routing is enabled, also call routeFind
        // to see if an automatic route exists.
        $customPathSearch = $this->customFind();
        if ($customPathSearch || (!$customPathSearch && $this->config['automatic_routing'])) {
            $this->routeFind();
        } 

        // If a route was found, but access was denied via the preExec callback...
        else if ($customPathSearch == -1) {
            $this->error('403');
        }

        // ELSE
        // Do nothing if there's no match. When and if routeExec is called user will be 
        // directed to 404. But until then, developers can use the exists() method to 
        // check different routes and possibly redirect the user somewhere else.
    }
public function routeProcess ( $ uri = false , $ httpMethod = false ) { // Set Request type. if ( ! $ httpMethod ) $ httpMethod = $ _SERVER [ 'REQUEST_METHOD' ] ; $ this -> httpMethod = $ httpMethod ; // Set PATH info. if ( ! $ uri ) $ uri = $ _SERVER [ 'REQUEST_URI' ] ; $ this -> setPath ( $ uri ) ; // BIG IDEA: routeFind() must be called to populate needed Controller and Method variables.  // // If a custom route is found, routeFind() still needs to be called to populate  // data member variables and complete the mapping from URI to a Controller file. // // If custom route is not set, but automatic routing is enabled, also call routeFind // to see if an automatic route exists. $ customPathSearch = $ this -> customFind ( ) ; if ( $ customPathSearch || ( ! $ customPathSearch && $ this -> config [ 'automatic_routing' ] ) ) { $ this -> routeFind ( ) ; } // If a route was found, but access was denied via the preExec callback... else if ( $ customPathSearch == - 1 ) { $ this -> error ( '403' ) ; } // ELSE // Do nothing if there's no match. When and if routeExec is called user will be  // directed to 404. But until then, developers can use the exists() method to  // check different routes and possibly redirect the user somewhere else. }
Checks if a custom or default route exists for a URL and HTTP method.
By default will grab URL and HTTP method from server variables,
but can be passed in as arguments.
Checks if a custom or default route exists for a URL and HTTP method . By default will grab URL and HTTP method from server variables but can be passed in as arguments .