diff options
| author | Malf Furious <m@lfurio.us> | 2017-02-16 03:07:26 -0500 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2017-02-16 03:07:26 -0500 | 
| commit | ea46bd0a4a040040c9cadd45441089bce9769bea (patch) | |
| tree | cba2d9a7ac97cc5eb9a086c953a30c660e92e1fd /examples/class/framework.class.php | |
| parent | 127a6bba72f699816f227164661e7b451a4e7e76 (diff) | |
| download | scrott-ea46bd0a4a040040c9cadd45441089bce9769bea.tar.gz scrott-ea46bd0a4a040040c9cadd45441089bce9769bea.zip  | |
Rm old content
Diffstat (limited to '')
| -rw-r--r-- | examples/class/framework.class.php | 59 | 
1 files changed, 0 insertions, 59 deletions
diff --git a/examples/class/framework.class.php b/examples/class/framework.class.php deleted file mode 100644 index 0461da7..0000000 --- a/examples/class/framework.class.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -abstract class Framework -{ -    /* -     * Get the absolute path on this server for the root of this app -     */ -    function ar() -    { -        return substr($_SERVER['PHP_SELF'], 0, -10); // 10 = length of "/index.php" -    } - -    /* -     * Get the absolute path to the current page -     */ -    function ap() -    { -        return $this->ar() . $_REQUEST['path']; -    } - -    /* -     * Redirect to the given URL and die -     */ -    function redirectTo($url) -    { -        header("Location: " . $url); -        exit; -    } - -    /* -     * Get or create the app's database connection object (this is a singleton object and dependent on system-level config) -     */ -    static function getDbConnection() -    { -        global $_SCROTT; - -        if (self::$dbobj != null) -            return self::$dbobj; - -        switch ($_SCROTT['dbEngine']) -        { -        case "mysql": -            $host     = $_SCROTT['dbAddress']; -            $username = $_SCROTT['dbUser']; -            $password = $_SCROTT['dbPass']; -            $dbName   = $_SCROTT['dbName']; -            self::$dbobj = new Mysql($host, $username, $password, $dbName); -            break; - -        default: -            throw new Exception("Problem with Scrott Configuration. Invalid database engine specified."); -            break; -        } - -        return self::$dbobj; -    } -} - -?>  | 
