Commit 0d655f98 authored by MatrixCrawler's avatar MatrixCrawler

No commit message

No commit message
parent d666c9d9
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* See the COPYRIGHT file. * See the COPYRIGHT file.
*/ */
require "config.inc.php"; require_once "config.inc.php";
/** /**
* Connects to database and returns the PDO Object or false * Connects to database and returns the PDO Object or false
...@@ -16,19 +16,11 @@ require "config.inc.php"; ...@@ -16,19 +16,11 @@ require "config.inc.php";
*/ */
class DB { class DB {
/**
* Constuctor.
* @return Ambigous <boolean, PDO>
*/
function __construct() {
return DB::connectDB();
}
/** /**
* Connects to the DB * Connects to the DB
* @return PDO|boolean * @return PDO|boolean
*/ */
private static function connectDB() { public static function connectDB() {
$dsn = DB_DRIVER.":dbname=".DB_NAME.";host=".DB_HOST; $dsn = DB_DRIVER.":dbname=".DB_NAME.";host=".DB_HOST;
if (DB_DRIVER == 'mysql') { if (DB_DRIVER == 'mysql') {
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment