Exemple #1
0
 /**
  *
  * @global DBConnect $__conn
  * @return DBConnect
  */
 public static function GetDefaultConnection()
 {
     static $__conn;
     require_once FCORE_FILE_DBCONNECT;
     if ($__conn == null)
     {
         $__conn = new DBConnect(self::$GLOBAL_LOGGER);
     }
     if (!$__conn->isConnected())
     {
         $__conn->connect(self::$DB_DEFAULT_HOST,
                 self::$DB_DEFAULT_USER,
                 self::$DB_DEFAULT_PASS,
                 self::$DB_DEFAULT_DB);
     }
     return $__conn;
 }