/**
* Database selector class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* 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
private $dbLayer = NULL;
// An instance of this class
- private static $thisInstance = NULL;
+ private static $selfInstance = NULL;
/**
* Protected constructor
}
// Create new database connection layer
- public static final function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseFrontendInterface $dbLayer) {
+ public static final function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseBackendInterface $dbLayer) {
// Get instance
$databaseInstance = new DatabaseConnection();
- // Set debug output handler
- $databaseInstance->setDebugInstance($debugInstance);
-
// Set database layer
$databaseInstance->setDatabaseLayer($dbLayer);
// Set db instance
- self::$thisInstance = $databaseInstance;
+ self::$selfInstance = $databaseInstance;
// Return instance
return $databaseInstance;
// Get an instance of this class
public static final function getSelfInstance () {
- return self::$thisInstance;
+ return self::$selfInstance;
}
// Public setter for database connection
* @param $dbLayer An instance of the real database layer
* @return void
*/
- public final function setDatabaseLayer (DatabaseFrontendInterface $dbLayer) {
+ public final function setDatabaseLayer (DatabaseBackendInterface $dbLayer) {
$this->dbLayer = $dbLayer;
}