Created script to import customers from IVT
This commit is contained in:
@@ -6,7 +6,8 @@ class FronkDB {
|
||||
private $lastError;
|
||||
private $log;
|
||||
|
||||
private static $instance;
|
||||
private static $instances = [];
|
||||
//private static $instance;
|
||||
|
||||
public function __construct($host=false,$user=false,$pass=false,$db=false) {
|
||||
$this->host=$host;
|
||||
@@ -24,11 +25,12 @@ class FronkDB {
|
||||
}
|
||||
|
||||
public static function singleton($host=false,$user=false,$pass=false,$db=false) {
|
||||
if(!isset(self::$instance)) {
|
||||
$c=__CLASS__;
|
||||
self::$instance=new $c($host,$user,$pass,$db);
|
||||
$instance_name = $host.$user.$db;
|
||||
if(!isset(self::$instances[$instance_name])) {
|
||||
$c = __CLASS__;
|
||||
self::$instances[$instance_name] = new $c($host,$user,$pass,$db);
|
||||
}
|
||||
return self::$instance;
|
||||
return self::$instances[$instance_name];
|
||||
}
|
||||
|
||||
private function connect() {
|
||||
|
||||
Reference in New Issue
Block a user