]> git.mxchange.org Git - core.git/blob - framework/main/classes/registry/format_upgrade/database/class_LocalFileDatabaseFormatUpgradeRegistry.php
c40b19a893df221e645ba2856bc8041a173e312b
[core.git] / framework / main / classes / registry / format_upgrade / database / class_LocalFileDatabaseFormatUpgradeRegistry.php
1 <?php
2 // Own namespace
3 namespace Org\Mxchange\CoreFramework\Registry\Upgrade\Format\Lfdb;
4
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
7 use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
8 use Org\Mxchange\CoreFramework\Upgrade\Format\Database\UpgradeableDatabaseFormat;
9 use Org\Mxchange\CoreFramework\Upgrade\Format\RegisterableFormatUpgrade;
10
11 /**
12  * A LocalFileDatabase database-format-upgrade registry
13  *
14  * @author              Roland Haeder <webmaster@ship-simu.org>
15  * @version             0.0.0
16  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
17  * @license             GNU GPL 3.0 or any newer version
18  * @link                http://www.ship-simu.org
19  *
20  * This program is free software: you can redistribute it and/or modify
21  * it under the terms of the GNU General Public License as published by
22  * the Free Software Foundation, either version 3 of the License, or
23  * (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program. If not, see <http://www.gnu.org/licenses/>.
32  */
33 class LocalFileDatabaseFormatUpgradeRegistry extends BaseRegistry implements RegisterableFormatUpgrade {
34         /**
35          * Instance of this class
36          */
37         private static $registryInstance = null;
38
39         /**
40          * Protected constructor
41          *
42          * @return      void
43          */
44         private function __construct () {
45                 // Call parent constructor
46                 parent::__construct(__CLASS__);
47         }
48
49         /**
50          * Singleton getter for self instance. This class has no factory pattern
51          * because here is no need for special parameters.
52          *
53          * @return      $registryInstance       Instance of this class
54          */
55         public final static function getRegistry () {
56                 // Is an instance there?
57                 if (is_null(self::$registryInstance)) {
58                         // Not yet, so create one
59                         self::$registryInstance = new LocalFileDatabaseFormatUpgradeRegistry();
60                 }
61
62                 // Return the instance
63                 return self::$registryInstance;
64         }
65
66         /**
67          * Registers given format-upgrade class with this registry
68          *
69          * @param       $upgradeInstance        An instance of a UpgradeableDatabaseFormat class
70          * @return      void
71          * @todo        0% done
72          */
73         public function registerFormatUpgrader (UpgradeableDatabaseFormat $upgradeInstance) {
74                 DebugMiddleware::getSelfInstance()->partialStub();
75         }
76
77 }