3 namespace CoreFramework\Database\Wrapper;
6 * A database wrapper for payments
8 * @author Roland Haeder <webmaster@shipsimu.org>
10 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
11 * @license GNU GPL 3.0 or any newer version
12 * @link http://www.shipsimu.org
13 * @todo Add missing own interface for public methods
15 * This program is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 class PaymentsDatabaseWrapper extends BaseDatabaseWrapper implements Registerable {
29 // Constants for exceptions
30 const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
32 // Constants for database table names
33 const DB_TABLE_PAYMENTS = 'payments';
36 * Protected constructor
40 protected function __construct () {
41 // Call parent constructor
42 parent::__construct(__CLASS__);
46 * Creates an instance of this database wrapper by a provided user class
48 * @return $wrapperInstance An instance of the created wrapper class
50 public static final function createPaymentsDatabaseWrapper () {
52 $wrapperInstance = new PaymentsDatabaseWrapper();
54 // Set (primary!) table name
55 $wrapperInstance->setTableName(self::DB_TABLE_PAYMENTS);
57 // Return the instance
58 return $wrapperInstance;