Ejemplo n.º 1
0
 public static function getInstance($host, $database, $username, $password)
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new DB_Custom($host, $database, $username, $password);
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 public function __construct($inf_db, $language)
 {
     $this->_db = DB_Custom::getInstance($inf_db['address'], $inf_db['name'], $inf_db['username'], $inf_db['password']);
     $this->_prefix = $inf_db['prefix'];
     $this->_language = $language;
 }