public static function detect($uri)
    {
        $routes = self::get();
        $found = false;
        foreach($routes as $key => $route) {
            $currentLength = strlen($route->route);
            if(substr($uri, 0, $currentLength) == $route->route) {
                $found = $route;
                break;
            }
        }
        
        return $found;
    }
public static function detect($uri)
    {
        $routes = self::get();
        $found = false;
        foreach($routes as $key => $route) {
            $currentLength = strlen($route->route);
            if(substr($uri, 0, $currentLength) == $route->route) {
                $found = $route;
                break;
            }
        }
        
        return $found;
    }
public static function detect ( $ uri ) { $ routes = self :: get ( ) ; $ found = false ; foreach ( $ routes as $ key => $ route ) { $ currentLength = strlen ( $ route -> route ) ; if ( substr ( $ uri , 0 , $ currentLength ) == $ route -> route ) { $ found = $ route ; break ; } } return $ found ; }
detect function.

@access public
@static
@param string $uri
@return false|\Ginger\Route
detect function .