Exemplo n.º 1
0
 static function create_from_ini($filename)
 {
     $data = parse_ini_file($filename);
     if ($data == false) {
         return false;
     }
     $dbcon = new DatabaseConnection($data['host'], $data['schema']);
     if (isset($data['method']) && $data['method'] == "sqlite") {
         $dbcon->connect_with_sqlite($data['file']);
     } else {
         $dbcon->connect_with_pdo($data['user'], $data['pass']);
     }
     return $dbcon;
 }