From a92f8af0f9aed383e4243e5b2b50d248e843cab4 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 14 Jan 2017 21:11:31 -0500 Subject: Add database class --- app/class/database.class.php | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/class/database.class.php (limited to 'app/class') diff --git a/app/class/database.class.php b/app/class/database.class.php new file mode 100644 index 0000000..4f26c45 --- /dev/null +++ b/app/class/database.class.php @@ -0,0 +1,58 @@ +close(); + } + + /* + * Return the database instance object, creating it if this is the + * first call to this function. This function will need maintained + * as new DBMSs are supported. + */ + public static function getInstance() : database + { + // TODO + } + + /* + * These functions are to be implemented by DBMS extensions, + * providing a uniform interface to database engines. + */ + public abstract function close() : void; + public abstract function query(string $query) : array; + public abstract function esc(string $str) : string; +} + +?> -- cgit v1.2.3