<?php
// Own namespace
-namespace CoreFramework\Registry\!!!;
+namespace Org\Mxchange\CoreFramework\Registry\!!!;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* Instance of this class
*/
- private static $registryInstance = null;
+ private static $registryInstances = [];
/**
* Protected constructor
*
* @return void
*/
- protected function __construct () {
+ private function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
*
* @return $registryInstance Instance of this class
*/
- public final static function getRegistry () {
+ public final static function getRegistry (string $key) {
// Is an instance there?
- if (is_null(self::$registryInstance)) {
+ if (is_null(self::$registryInstances[$key])) {
// Not yet, so create one
- self::$registryInstance = new ???Registry();
- } // END - if
+ self::$registryInstances[$key] = new ???Registry();
+ }
// Return the instance
- return self::$registryInstance;
+ return self::$registryInstances[$key];
}
}