pandorafms/pandora_console/mobile/include/db.class.php

48 lines
1.2 KiB
PHP
Raw Normal View History

2010-09-15 17:54:59 +02:00
<?php
2021-09-29 17:03:13 +02:00
// Barivion - http://barivion.com
2010-09-15 17:54:59 +02:00
// ==================================================
2020-11-27 13:52:35 +01:00
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
2010-09-15 17:54:59 +02:00
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Singleton
class DB
{
private static $instance;
private $system;
private $engine;
public function __construct($engine='mysql')
{
$this->system = &$system;
$this->engine = $engine;
switch ($engine) {
case 'mysql':
// NONE
break;
}
}
public static function getInstance($engine='mysql')
{
if (!(self::$instance instanceof self)) {
self::$instance = new self($engine);
}
return self::$instance;
}
2010-09-15 17:54:59 +02:00
}