API_Route::scanRoute PHP Метод

scanRoute() публичный статический Метод

Scan Route
public static scanRoute ( string $requestMethod, string $url ) : boolean
$requestMethod string
$url string
Результат boolean
    public static function scanRoute($requestMethod, $url)
    {
        $urlArray = explode("/", $url);
        if ($urlArray[0] == "") {
            array_shift($urlArray);
        }
        // Firstly, we should check request method
        if ($requestMethod != 'POST' && $requestMethod != 'GET') {
            $requestMethod = "GET";
        }
        $checkList = array('GLOBAL', $requestMethod);
        foreach ($checkList as $item) {
            //self::_checkRegExp($url, self::$_regExList[$item]);
            self::_analyze(0, $urlArray, self::$_ruleTree[$item]);
        }
    }