X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffactories%2Fuser%2Fclass_UserFactory.php;h=9aeb0588c7737b938bf131c3ee21f50d3e899dae;hp=3e15d02815bc8909ec72be57655a7ac747c47e66;hb=refs%2Fheads%2Fmaster;hpb=78a010fef84895720e796842208f01dfb619c332 diff --git a/framework/main/classes/factories/user/class_UserFactory.php b/framework/main/classes/factories/user/class_UserFactory.php index 3e15d028..9aeb0588 100644 --- a/framework/main/classes/factories/user/class_UserFactory.php +++ b/framework/main/classes/factories/user/class_UserFactory.php @@ -1,19 +1,19 @@ * @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.shipsimu.org * @@ -30,13 +30,13 @@ use CoreFramework\Request\Requestable; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserFactory extends ObjectFactory { +class UserFactory extends BaseFactory { /** * Protected constructor * * @return void */ - protected function __construct () { + private function __construct () { // Call parent constructor parent::__construct(__CLASS__); } @@ -49,7 +49,7 @@ class UserFactory extends ObjectFactory { */ public static final function createUserByRequest (Requestable $requestInstance) { // Get registry instance - $registryInstance = Registry::getRegistry(); + $registryInstance = ObjectRegistry::getRegistry('factory'); // Do we have an instance in the registry? if ($registryInstance->instanceExists('user')) { @@ -59,13 +59,13 @@ class UserFactory extends ObjectFactory { // Probe on member instance try { // Get class name - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('user_class'); + $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'); // Try to instance it $userInstance = call_user_func_array(array($className, 'createMemberByRequest'), array($requestInstance)); } catch (UnexpectedGuestAccountException $e) { // Then try it with guest account - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('guest_class'); + $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'); // Try to instance it $userInstance = call_user_func_array(array($className, 'createGuestByRequest'), array($requestInstance));