X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffactories%2Fdatabase%2Fclass_DatabaseWrapperFactory.php;h=5ecdea49a702be2cc9816e07a86261906f8039e2;hp=f2e8ab1925370869fb73897d401db9adbdced038;hb=6fd01888b51f210394c4b7bb5e0ac2a28efb0c99;hpb=4b88c118b615335d06bd74e444173d21aef4406c diff --git a/inc/classes/main/factories/database/class_DatabaseWrapperFactory.php b/inc/classes/main/factories/database/class_DatabaseWrapperFactory.php index f2e8ab19..5ecdea49 100644 --- a/inc/classes/main/factories/database/class_DatabaseWrapperFactory.php +++ b/inc/classes/main/factories/database/class_DatabaseWrapperFactory.php @@ -2,11 +2,11 @@ /** * A factory class for socket registries * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,16 @@ * along with this program. If not, see . */ class DatabaseWrapperFactory extends ObjectFactory { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + /** * Returns a singleton socket registry instance. If an instance is found in * the registry it will be returned, else a new instance is created and @@ -39,7 +49,7 @@ class DatabaseWrapperFactory extends ObjectFactory { $wrapperInstance = $registryInstance->getInstance($wrapperName); } else { // Get the registry instance - $wrapperInstance = ObjectFactory::createObjectByConfiguredName($wrapperName); + $wrapperInstance = self::createObjectByConfiguredName($wrapperName); // Set the instance in registry for further use $registryInstance->addInstance($wrapperName, $wrapperInstance); @@ -48,16 +58,6 @@ class DatabaseWrapperFactory extends ObjectFactory { // Return the instance return $wrapperInstance; } - - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } } // [EOF]