*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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
*
);
// The real database layer
- private $dbLayer = null;
+ private $dbLayer = NULL;
// An instance of this class
- private static $thisInstance = null;
+ private static $selfInstance = NULL;
/**
* Protected constructor
*
* @return void
*/
- protected function __construct() {
+ protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
// Create new database connection layer
- public final static function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseFrontendInterface $dbLayer) {
+ public static final function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseFrontendInterface $dbLayer) {
// Get instance
- $dbInstance = new DatabaseConnection();
+ $databaseInstance = new DatabaseConnection();
// Set debug output handler
- $dbInstance->setDebugInstance($debugInstance);
+ $databaseInstance->setDebugInstance($debugInstance);
// Set database layer
- $dbInstance->setDatabaseLayer($dbLayer);
+ $databaseInstance->setDatabaseLayer($dbLayer);
// Set db instance
- self::$thisInstance = $dbInstance;
+ self::$selfInstance = $databaseInstance;
// Return instance
- return $dbInstance;
+ return $databaseInstance;
}
// Get an instance of this class
- public final static function getInstance () {
- return self::$thisInstance;
+ public static final function getSelfInstance () {
+ return self::$selfInstance;
}
// Public setter for database connection
$this->dbLayer->connectToDatabase();
// Get result from query
- $result = $this->dbLayer->querySelect('array', $tableName, $criteriaInstance);
+ $result = $this->dbLayer->querySelect($tableName, $criteriaInstance);
// Return the result
return $result;