]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 25 Feb 2023 11:15:43 +0000 (12:15 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 25 Feb 2023 11:15:43 +0000 (12:15 +0100)
- ops, mixed both registries ...

framework/main/classes/factories/registry/class_SocketRegistryFactory.php

index b527814ea8d449031e24a4c3f68115ef6526f9be..a3b985c4ea55f5fed6cc104a49ea230f9ddce16b 100644 (file)
@@ -49,21 +49,26 @@ class SocketRegistryFactory extends BaseFactory {
         */
        public static final function createSocketRegistryInstance () {
                // Get registry instance
-               $registryInstance = ObjectRegistry::getRegistry('factory');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('SOCKET-REGISTRY-FACTORY: CALLED!');
+               $objectRegistryInstance = ObjectRegistry::getRegistry('factory');
 
                // Do we have an instance in the registry?
-               if ($registryInstance->instanceExists('socket_registry')) {
+               if ($objectRegistryInstance->instanceExists('socket_registry')) {
                        // Then use this instance
-                       $registryInstance = $registryInstance->getInstance('socket_registry');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('SOCKET-REGISTRY-FACTORY: Getting socket registry instance ...');
+                       $registryInstance = $objectRegistryInstance->getInstance('socket_registry');
                } else {
                        // Get the registry instance
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('SOCKET-REGISTRY-FACTORY: Creating new socket registry instance ...');
                        $registryInstance = ObjectFactory::createObjectByConfiguredName('socket_registry_class');
 
                        // Set the instance in registry for further use
-                       $registryInstance->addInstance('socket_registry', $registryInstance);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('SOCKET-REGISTRY-FACTORY: Adding socket registry instance ...');
+                       $objectRegistryInstance->addInstance('socket_registry', $registryInstance);
                }
 
                // Return the instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('SOCKET-REGISTRY-FACTORY: registryInstance=%s - EXIT!', $registryInstance->__toString()));
                return $registryInstance;
        }