Example #1
0
 /**
  * returns an instance of a sqlite connection
  * 
  * @return instance of this class
  */
 public static function getInstance()
 {
     if (null === self::$instance) {
         self::$instance = new SQLite3(self::$dbfile);
     }
     return self::$instance;
 }
Example #2
0
 public static function getInstance($dbDetails = null)
 {
     if ($dbDetails == null) {
         $dbDetails = array('db_name' => 'ant_web', 'db_host' => 'localhost', 'db_user' => 'root', 'db_pass' => 'root');
     }
     // Check if instance already exists
     if (self::$instance == null) {
         self::$instance = new DBConnector($dbDetails);
     }
     return self::$instance;
 }
Example #3
0
 public static function getInstance($dbDetails = null)
 {
     if ($dbDetails == null) {
         //keith's home computer localhost:8889 root root
         //jonathan's home computer localhost:8888 root
         $dbDetails = array('db_name' => 'photo4130', 'db_host' => 'localhost:8888', 'db_user' => 'root', 'db_pass' => '');
     }
     // Check if instance already exists
     if (self::$instance == null) {
         self::$instance = new DBConnector($dbDetails);
     }
     return self::$instance;
 }