*/
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;
}