]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/factories/user/class_UserFactory.php
Continued:
[core.git] / framework / main / classes / factories / user / class_UserFactory.php
index 3e15d02815bc8909ec72be57655a7ac747c47e66..9aeb0588c7737b938bf131c3ee21f50d3e899dae 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 // Own namespace
-namespace CoreFramework\Factory\User;
+namespace Org\Mxchange\CoreFramework\Factory\User;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
-use CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
 
 /**
  * A factory class for socket registries
  *
  * @author             Roland Haeder <webmaster@shipsimu.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.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 <http://www.gnu.org/licenses/>.
  */
-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));