system/classes/Route.php
public function exists($uri = false, $httpMethod = false)
    {
        // If wanting to check if a passed in uri and method have a path mapping
        if ($uri && $httpMethod) {
            $this->routeProcess($uri, $httpMethod);
        }
        
        // After a URI is processed, it should result in a controller path being set if a 
        // matching one exists. If not set, that means there was no matching controller to given URI.
        if (!isset($this->controllerPath)) {
            return false;
        }
        return true;
    }
public function exists($uri = false, $httpMethod = false)
    {
        // If wanting to check if a passed in uri and method have a path mapping
        if ($uri && $httpMethod) {
            $this->routeProcess($uri, $httpMethod);
        }
        
        // After a URI is processed, it should result in a controller path being set if a 
        // matching one exists. If not set, that means there was no matching controller to given URI.
        if (!isset($this->controllerPath)) {
            return false;
        }
        return true;
    }
public function exists ( $ uri = false , $ httpMethod = false ) { // If wanting to check if a passed in uri and method have a path mapping if ( $ uri && $ httpMethod ) { $ this -> routeProcess ( $ uri , $ httpMethod ) ; } // After a URI is processed, it should result in a controller path being set if a  // matching one exists. If not set, that means there was no matching controller to given URI. if ( ! isset ( $ this -> controllerPath ) ) { return false ; } return true ; }
Checks if a given URI and HTTP Method can be mapped to Controller.

If no URI and HTTP Method are passed in, then it will make the assumption that
routeProcess has already been called and simply see if a controller was found.
As such, either make sure you either explicitely state what resource you want to check
or manually call routeProcess() before calling this method.

Note: This helps with integrating Cora into legacy applications.
You can check if a matching controller was found in the directory you're putting
Cora controllers in, and if not, then run legacy routing instead.
Checks if a given URI and HTTP Method can be mapped to Controller .