namespace Org\Mxchange\CoreFramework\Factory\Database\Frontend;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
/**
* A factory class for socket registries
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 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.shipsimu.org
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class DatabaseFrontendFactory extends ObjectFactory {
+class DatabaseFrontendFactory extends BaseFactory {
/**
* Protected constructor
*
* @return void
*/
- protected function __construct () {
+ private function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
*
* @return $frontendInstance A database frontend instance
*/
- public static final function createFrontendByConfiguredName ($frontendName) {
+ public static final function createFrontendByConfiguredName (string $frontendName) {
// Get registry instance
- $registryInstance = GenericRegistry::getRegistry();
+ $registryInstance = ObjectRegistry::getRegistry('generic');
// Do we have an instance in the registry?
if ($registryInstance->instanceExists($frontendName)) {
$frontendInstance = $registryInstance->getInstance($frontendName);
} else {
// Get the registry instance
- $frontendInstance = self::createObjectByConfiguredName($frontendName);
+ $frontendInstance = ObjectFactory::createObjectByConfiguredName($frontendName);
// Set the instance in registry for further use
$registryInstance->addInstance($frontendName, $frontendInstance);