Continued with renaming-season:
[core.git] / framework / main / classes / database / frontend / class_PaymentsDatabaseWrapper.php
1 <?php
2 // Own namespace
3 namespace CoreFramework\Database\Wrapper;
4
5 /**
6  * A database wrapper for payments
7  *
8  * @author              Roland Haeder <webmaster@shipsimu.org>
9  * @version             0.0.0
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
14  *
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.
19  *
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.
24  *
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/>.
27  */
28 class PaymentsDatabaseWrapper extends BaseDatabaseWrapper implements Registerable {
29         // Constants for exceptions
30         const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
31
32         // Constants for database table names
33         const DB_TABLE_PAYMENTS = 'payments';
34
35         /**
36          * Protected constructor
37          *
38          * @return      void
39          */
40         protected function __construct () {
41                 // Call parent constructor
42                 parent::__construct(__CLASS__);
43         }
44
45         /**
46          * Creates an instance of this database wrapper by a provided user class
47          *
48          * @return      $wrapperInstance        An instance of the created wrapper class
49          */
50         public static final function createPaymentsDatabaseWrapper () {
51                 // Get a new instance
52                 $wrapperInstance = new PaymentsDatabaseWrapper();
53
54                 // Set (primary!) table name
55                 $wrapperInstance->setTableName(self::DB_TABLE_PAYMENTS);
56
57                 // Return the instance
58                 return $wrapperInstance;
59         }
60
61 }