From: Roland Häder Date: Sat, 25 Feb 2023 11:15:43 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c8a3c34ca616282e59ebb768e2849f00f7243193;p=core.git Continued: - ops, mixed both registries ... --- diff --git a/framework/main/classes/factories/registry/class_SocketRegistryFactory.php b/framework/main/classes/factories/registry/class_SocketRegistryFactory.php index b527814e..a3b985c4 100644 --- a/framework/main/classes/factories/registry/class_SocketRegistryFactory.php +++ b/framework/main/classes/factories/registry/class_SocketRegistryFactory.php @@ -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; }