public static function appmap($routes)
    {
        foreach ($routes as $regex => $appfile) {
            if (preg_match('~^' . $regex . '$~', ROUTES_CURRENTURI)) {
                import::app($appfile);
                return true;
            }
        }
        die('LogError: No Routes Found For ' . ROUTES_CURRENTURI);
    }
    public static function classmap($app, $dir_prefix, $routes)
    {
        foreach ($routes as $regex => $appfile) {
            if ($regex == '/') {
                // sometimes users will enter /admin instead of /admin/, so if
                // the regex is a /, wee need to change it to /? to account for
                // this issue.
                $regex .= '?';
            }
            if (preg_match('~^' . $dir_prefix . $regex . '$~', ROUTES_CURRENTURI)) {
                import::app($app . '/' . $appfile . '.php');
                $app = new $appfile();
                return true;
            }
            echo $dir_prefix . $regex . "\n";
        }
        die('LogError: No Class Routes Found For ' . ROUTES_CURRENTURI);
    }
}
routes::seturi();