X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fdatabase%2Fwrapper%2Fclass_UserDatabaseWrapper.php;h=d1fe11694bd86cf3ce649b3d0f21265cb06d9f82;hb=f97af6b5b50bc961ec5ad850b73765d64811a5bc;hp=549dd09fc2b1fa67668634fb635f3bfc2ce1b4dd;hpb=361e6320e50a8bb1a3ccb675388b8042361669ae;p=core.git diff --git a/inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php b/inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php index 549dd09f..d1fe1169 100644 --- a/inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php +++ b/inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -26,21 +26,21 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180; // Constants for database columns - const DB_COLUMN_USERID = "userid"; - const DB_COLUMN_USERNAME = "username"; - const DB_COLUMN_EMAIL = "email"; - const DB_COLUMN_CONFIRM_HASH = "confirm_hash"; - const DB_COLUMN_USER_STATUS = "user_status"; + const DB_COLUMN_USERID = 'userid'; + const DB_COLUMN_USERNAME = 'username'; + const DB_COLUMN_EMAIL = 'email'; + const DB_COLUMN_CONFIRM_HASH = 'confirm_hash'; + const DB_COLUMN_USER_STATUS = 'user_status'; // Constants for database table names - const DB_TABLE_USER = "user"; + const DB_TABLE_USER = 'user'; /** * Protected constructor * * @return void */ - protected function __construct() { + protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); } @@ -50,7 +50,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou * * @return $wrapperInstance An instance of the created wrapper class */ - public final static function createUserDatabaseWrapper () { + public static final function createUserDatabaseWrapper () { // Get a new instance $wrapperInstance = new UserDatabaseWrapper(); @@ -61,15 +61,6 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou return $wrapperInstance; } - /** - * Getter for index key - * - * @return $indexKey Index key - */ - public final function getIndexKey () { - return $this->getDatabaseInstance()->getIndexKey(); - } - /** * Handles inserting the registration data from a registration instance into the database * @@ -87,7 +78,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou $registrationInstance->addElementsToDataSet($dataSetInstance); // "Insert" this request instance completely into the database - $this->getDatabaseInstance()->queryInsertDataSet($dataSetInstance); + $this->queryInsertDataSet($dataSetInstance); } /** @@ -118,7 +109,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper implements ManageableAccou // Is it still null? if (is_null($searchInstance)) { // Throw an exception here - throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); + throw new NullPointerException($updateInstance, self::EXCEPTION_IS_NULL_POINTER); } // END - if } // END - if