Update database.php
This commit is contained in:
@@ -272,7 +272,7 @@
|
|||||||
* Singleton type class
|
* Singleton type class
|
||||||
* @var database
|
* @var database
|
||||||
*/
|
*/
|
||||||
private $database;
|
private static $database;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
@@ -3080,9 +3080,9 @@
|
|||||||
* @see database::__construct()
|
* @see database::__construct()
|
||||||
* @see database::connect()
|
* @see database::connect()
|
||||||
*/
|
*/
|
||||||
public static function new() {
|
public static function new(array $params = []) {
|
||||||
if (self::$database === null)
|
if (self::$database === null) {
|
||||||
self::$database = new database();
|
self::$database = new database($params);
|
||||||
self::$database->connect();
|
self::$database->connect();
|
||||||
}
|
}
|
||||||
return self::$database;
|
return self::$database;
|
||||||
|
|||||||
Reference in New Issue
Block a user