From b8399b10118a69e1cea767e355a3153974986fe6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 25 Feb 2023 10:57:23 +0100 Subject: [PATCH] Continued (WIP): - moved more from GenericRegistry to ObjectRegistry - including registry segmentation by parameter $key - updated 'core' framework --- .../console/class_HubConsoleAptProxyCommand.php | 6 +++--- .../console/class_HubConsoleChatCommand.php | 6 +++--- .../console/class_HubConsoleCrawlerCommand.php | 6 +++--- .../console/class_HubConsoleCruncherCommand.php | 6 +++--- .../console/class_HubConsoleDaemonCommand.php | 4 ++-- .../console/class_HubConsoleMinerCommand.php | 6 +++--- .../hub/classes/crawler/class_BaseNodeCrawler.php | 4 ++-- .../class_NodeConsoleDistributedCrawler.php | 2 +- .../hub/classes/cruncher/class_BaseHubCruncher.php | 4 ++-- .../socket/class_PackageSocketDiscovery.php | 4 ++-- .../chain/class_PackageFilterChainFactory.php | 7 ++++--- .../factories/chunks/class_ChunkHandlerFactory.php | 8 ++++---- application/hub/classes/factories/class_ | 8 ++++---- .../factories/client/class_ClientFactory.php | 8 ++++---- .../communicator/class_CommunicatorFactory.php | 8 ++++---- .../factories/decoder/class_DecoderFactory.php | 8 ++++---- .../factories/dht/class_DhtObjectFactory.php | 8 ++++---- .../discovery/class_PackageDiscoveryFactory.php | 8 ++++---- .../discovery/class_SocketDiscoveryFactory.php | 8 ++++---- .../handler/class_MessageTypeHandlerFactory.php | 8 ++++---- .../handler/class_NetworkPackageHandlerFactory.php | 8 ++++---- .../handler/class_ProtocolHandlerFactory.php | 8 ++++---- .../factories/info/class_ConnectionInfoFactory.php | 8 ++++---- .../factories/lists/class_RecipientListFactory.php | 8 ++++---- .../locator/class_UniversalNodeLocatorFactory.php | 8 ++++---- .../factories/node/class_NodeObjectFactory.php | 11 +++++++---- .../assembler/class_PackageAssemblerFactory.php | 8 ++++---- .../package/class_NetworkPackageFactory.php | 8 ++++---- .../package/fragmenter/class_FragmenterFactory.php | 8 ++++---- .../factories/producer/class_ProducerFactory.php | 8 ++++---- .../registry/class_ObjectTypeRegistryFactory.php | 8 ++++---- .../resolver/class_ProtocolResolverFactory.php | 8 ++++---- .../factories/socket/class_SocketFactory.php | 14 +++++++------- .../source/units/class_UnitSourceFactory.php | 8 ++++---- .../source/url/class_UrlSourceObjectFactory.php | 10 +++++----- .../states/crawler/class_CrawlerStateFactory.php | 4 ++-- .../states/cruncher/class_CruncherStateFactory.php | 4 ++-- .../states/miner/class_MinerStateFactory.php | 4 ++-- .../factories/tags/class_PackageTagsFactory.php | 8 ++++---- .../class_NodeActivationAnnouncementFilter.php | 4 ++-- .../class_AptProxyInitializationFilter.php | 4 ++-- .../class_AptProxyWelcomeTeaserFilter.php | 4 ++-- .../bootstrap/apt-proxy/class_AptProxyBootstrap | 4 ++-- ...s_AptProxyBootstrapExtraBootstrappingFilter.php | 4 ++-- ...ss_AptProxyBootstrapGenericActivationFilter.php | 4 ++-- .../filter/bootstrap/chat/class_ChatBootstrap | 4 ++-- ...class_ChatBootstrapExtraBootstrappingFilter.php | 4 ++-- .../class_ChatBootstrapGenericActivationFilter.php | 4 ++-- .../bootstrap/crawler/class_CrawlerBootstrap | 4 ++-- ...ss_CrawlerBootstrapExtraBootstrappingFilter.php | 4 ++-- ...ass_CrawlerBootstrapGenericActivationFilter.php | 4 ++-- .../bootstrap/cruncher/class_CruncherBootstrap | 4 ++-- ...uncherBootstrapBufferQueueInitializerFilter.php | 4 ++-- ...s_CruncherBootstrapExtraBootstrappingFilter.php | 4 ++-- ...ss_CruncherBootstrapGenericActivationFilter.php | 4 ++-- .../filter/bootstrap/miner/class_MinerBootstrap | 4 ++-- ..._MinerBootstrapBufferQueueInitializerFilter.php | 4 ++-- ...lass_MinerBootstrapExtraBootstrappingFilter.php | 4 ++-- ...class_MinerBootstrapGenericActivationFilter.php | 4 ++-- .../filter/chat/class_ChatInitializationFilter.php | 4 ++-- .../filter/chat/class_ChatWelcomeTeaserFilter.php | 4 ++-- .../crawler/class_CrawlerInitializationFilter.php | 2 +- .../crawler/class_CrawlerWelcomeTeaserFilter.php | 4 ++-- .../class_CruncherInitializationFilter.php | 2 +- .../cruncher/class_CruncherWelcomeTeaserFilter.php | 4 ++-- .../miner/class_MinerInitializationFilter.php | 2 +- .../miner/class_MinerWelcomeTeaserFilter.php | 4 ++-- .../apt-proxy/class_AptProxyShutdownFilter.php | 4 ++-- .../shutdown/chat/class_ChatShutdownFilter.php | 4 ++-- .../crawler/class_CrawlerShutdownFilter.php | 4 ++-- .../cruncher/class_CruncherShutdownFilter.php | 4 ++-- .../shutdown/miner/class_MinerShutdownFilter.php | 4 ++-- .../node/class_NodeShutdownTaskHandlerFilter.php | 4 ++-- .../class_AptProxyTaskHandlerInitializerFilter.php | 6 +++--- .../class_ChatTaskHandlerInitializerFilter.php | 6 +++--- .../filter/task/class_BaseCrawlerTaskFilter.php | 4 ++-- ...wlerDistributedTaskHandlerInitializerFilter.php | 4 ++-- .../class_CruncherTaskHandlerInitializerFilter.php | 6 +++--- .../class_MinerTaskHandlerInitializerFilter.php | 6 +++--- .../class_NodeTaskHandlerInitializerFilter.php | 4 ++-- .../class_NodeAnnouncementAnswerOkayHandler.php | 4 ++-- .../package/class_NetworkPackageHandler.php | 4 ++-- .../connection/class_BaseConnectionHelper.php | 4 ++-- .../hub/classes/miner/class_BaseHubMiner.php | 4 ++-- .../hub/classes/nodes/boot/class_HubBootNode.php | 2 +- .../hub/classes/nodes/class_BaseHubNode.php | 6 +++--- .../hub/classes/nodes/list/class_HubListNode.php | 2 +- .../classes/nodes/master/class_HubMasterNode.php | 2 +- .../classes/nodes/regular/class_HubRegularNode.php | 2 +- application/hub/classes/pools/class_BasePool.php | 8 ++++---- .../cruncher/class_BaseCruncherProducer.php | 4 ++-- .../producer/miner/class_BaseMinerProducer.php | 4 ++-- .../hub/classes/tags/package/class_PackageTags.php | 2 +- .../class_CrawlerNodeCommunicatorTask.php | 4 ++-- .../cruncher/class_CruncherKeyProducerTask.php | 4 ++-- .../class_CruncherTestUnitProducerTask.php | 4 ++-- .../cruncher/class_CruncherWorkUnitFetcherTask.php | 4 ++-- .../block_fetcher/class_MinerBlockFetcherTask.php | 4 ++-- .../class_MinerRealGenesisBlockProducerTask.php | 4 ++-- .../class_MinerTestGenesisBlockProducerTask.php | 4 ++-- .../class_XmlObjectRegistryTemplateEngine.php | 2 +- core | 2 +- 102 files changed, 264 insertions(+), 260 deletions(-) diff --git a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php index 5f6017359..83254c90e 100644 --- a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -86,13 +86,13 @@ class HubConsoleAptProxyCommand extends BaseCommand implements Commandable { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); // Get apt-proxy instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Add some apt-proxy-specific filters $proxyInstance->addExtraAptProxyFilters(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php index ab5d0d12a..94db02e03 100644 --- a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -86,13 +86,13 @@ class HubConsoleChatCommand extends BaseCommand implements Commandable { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); // Get chat instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Add some chat-specific filters $chatInstance->addExtraChatFilters(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php index eb9df8db3..911910a9f 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -86,13 +86,13 @@ class HubConsoleCrawlerCommand extends BaseCommand implements Commandable { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); // Get crawler instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Add some crawler-specific filters $crawlerInstance->addExtraCrawlerFilters(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php index b8022fee8..818442643 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -86,13 +86,13 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); // Get cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Add some cruncher-specific filters $cruncherInstance->addExtraCruncherFilters(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/commands/console/class_HubConsoleDaemonCommand.php b/application/hub/classes/commands/console/class_HubConsoleDaemonCommand.php index 4826c63aa..2a3dc47b9 100644 --- a/application/hub/classes/commands/console/class_HubConsoleDaemonCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleDaemonCommand.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -103,7 +103,7 @@ class HubConsoleDaemonCommand extends BaseCommand implements Commandable { $nodeInstance->activateNode($requestInstance, $responseInstance); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php index 7b3bfe1a2..a286be8ce 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php @@ -8,7 +8,7 @@ use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -86,13 +86,13 @@ class HubConsoleMinerCommand extends BaseCommand implements Commandable { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Add some miner-specific filters $minerInstance->addExtraMinerFilters(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: --- Entering main loop. ---'); diff --git a/application/hub/classes/crawler/class_BaseNodeCrawler.php b/application/hub/classes/crawler/class_BaseNodeCrawler.php index d410a9d5b..fc887d097 100644 --- a/application/hub/classes/crawler/class_BaseNodeCrawler.php +++ b/application/hub/classes/crawler/class_BaseNodeCrawler.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem; // Import framework stuff use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\State\Stateable; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; @@ -54,7 +54,7 @@ abstract class BaseNodeCrawler extends BaseHubSystem { parent::__construct($className); // Set this crawler instance in registry - GenericRegistry::getRegistry()->addInstance('crawler', $this); + ObjectRegistry::getRegistry('hub')->addInstance('crawler', $this); // Init state which sets the state to 'init' $this->initState(); diff --git a/application/hub/classes/crawler/console/class_NodeConsoleDistributedCrawler.php b/application/hub/classes/crawler/console/class_NodeConsoleDistributedCrawler.php index ccd8bc4e2..649b73b46 100644 --- a/application/hub/classes/crawler/console/class_NodeConsoleDistributedCrawler.php +++ b/application/hub/classes/crawler/console/class_NodeConsoleDistributedCrawler.php @@ -7,7 +7,7 @@ use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/cruncher/class_BaseHubCruncher.php b/application/hub/classes/cruncher/class_BaseHubCruncher.php index fbae1b0c8..d8bc09223 100644 --- a/application/hub/classes/cruncher/class_BaseHubCruncher.php +++ b/application/hub/classes/cruncher/class_BaseHubCruncher.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Updateable; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A general hub cruncher class @@ -72,7 +72,7 @@ abstract class BaseHubCruncher extends BaseHubSystem implements Updateable { parent::__construct($className); // Set this cruncher instance in registry - GenericRegistry::getRegistry()->addInstance('cruncher', $this); + ObjectRegistry::getRegistry('hub')->addInstance('cruncher', $this); // Init this cruncher $this->initCruncher(); diff --git a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php index e406aa2ba..dd5aeae34 100644 --- a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -18,7 +18,7 @@ use Org\Shipsimu\Hub\Resolver\State\Peer\PeerStateResolver; // Import framework stuff use Org\Mxchange\CoreFramework\Generic\NullPointerException; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; @@ -216,7 +216,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera // Try to resolve the socket resource try { // Get the helper instance from registry - $helperInstance = GenericRegistry::getRegistry()->getInstance('connection'); + $helperInstance = ObjectRegistry::getRegistry('hub')->getInstance('connection'); // Is a state set and it's name is other than socket's error code? /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-SOCKET-DISCOVERY: helperInstance->stateInstance[]=%s', gettype($helperInstance->getStateInstance()))); diff --git a/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php b/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php index aaadc016b..e3d409060 100644 --- a/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php +++ b/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php @@ -6,6 +6,7 @@ namespace Org\Shipsimu\Hub\Factory\FilterChain\Package; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for network packages @@ -51,9 +52,9 @@ class PackageFilterChainFactory extends BaseFactory { $registryKey = GenericRegistry::getRegistryKeyFromArray('package_filter_chain', $tags); // Is the registry key there? - if (GenericRegistry::getRegistry()->instanceExists($registryKey)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) { // Yes, then use that instance - $chainInstance = GenericRegistry::getRegistry()->getInstance($registryKey); + $chainInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey); } else { // Initialize a filter chain class $chainInstance = Object::createObjectByConfiguredName('package_filter_chain_class'); @@ -73,7 +74,7 @@ class PackageFilterChainFactory extends BaseFactory { } // Add the finished chain to the registry - GenericRegistry::getRegistry()->addInstance($registryKey, $chainInstance); + ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $chainInstance); } // Return the chain instance diff --git a/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php b/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php index b55295842..4df383788 100644 --- a/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php +++ b/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Chunk; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for chunk handler @@ -47,15 +47,15 @@ class ChunkHandlerFactory extends BaseFactory { */ public static final function createChunkHandlerInstance () { // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('chunk_handler')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('chunk_handler')) { // Get handler from registry - $handlerInstance = GenericRegistry::getRegistry()->getInstance('chunk_handler'); + $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('chunk_handler'); } else { // Get the handler instance $handlerInstance = ObjectFactory::createObjectByConfiguredName('chunk_handler_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('chunk_handler', $handlerInstance); + ObjectRegistry::getRegistry('factory')->addInstance('chunk_handler', $handlerInstance); } // Return the instance diff --git a/application/hub/classes/factories/class_ b/application/hub/classes/factories/class_ index bcbbe18fe..f13e617a8 100644 --- a/application/hub/classes/factories/class_ +++ b/application/hub/classes/factories/class_ @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for !!! @@ -47,15 +47,15 @@ class ???Factory extends BaseFactory { */ public static final function create???Instance () { // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('|||')) { + if (ObjectRegistry::getRegistry('hub')->instanceExists('|||')) { // Get handler from registry - $%%%Instance = GenericRegistry::getRegistry()->getInstance('|||'); + $%%%Instance = ObjectRegistry::getRegistry('hub')->getInstance('|||'); } else { // Get the handler instance $%%%Instance = ObjectFactory::createObjectByConfiguredName('|||_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('|||', $%%%Instance); + ObjectRegistry::getRegistry('hub')->addInstance('|||', $%%%Instance); } // Return the instance diff --git a/application/hub/classes/factories/client/class_ClientFactory.php b/application/hub/classes/factories/client/class_ClientFactory.php index de5b83bab..5725a2d5f 100644 --- a/application/hub/classes/factories/client/class_ClientFactory.php +++ b/application/hub/classes/factories/client/class_ClientFactory.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * An object factory for clients @@ -62,9 +62,9 @@ class ClientFactory extends BaseFactory { $registryKey = strtolower($protocolInstance->getProtocolName()) . '_client'; // Is the key already in registry? - if (GenericRegistry::getRegistry()->instanceExists($registryKey)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) { // Then use that instance - $clientInstance = GenericRegistry::getRegistry()->getInstance($registryKey); + $clientInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey); // Is socket instance given? if ($socketInstance instanceof StorableSocket) { @@ -76,7 +76,7 @@ class ClientFactory extends BaseFactory { $clientInstance = ObjectFactory::createObjectByConfiguredName($registryKey, array($socketInstance)); // Set it in registry for later re-use - GenericRegistry::getRegistry()->addInstance($registryKey, $clientInstance); + ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $clientInstance); } // Return the prepared instance diff --git a/application/hub/classes/factories/communicator/class_CommunicatorFactory.php b/application/hub/classes/factories/communicator/class_CommunicatorFactory.php index 85ad0c5e9..6b2c511d1 100644 --- a/application/hub/classes/factories/communicator/class_CommunicatorFactory.php +++ b/application/hub/classes/factories/communicator/class_CommunicatorFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Communicator; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -63,15 +63,15 @@ class CommunicatorFactory extends BaseFactory { } // If there is no communicator? - if (GenericRegistry::getRegistry()->instanceExists($communicatorType . '_communicator')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($communicatorType . '_communicator')) { // Get communicator from registry - $communicatorInstance = GenericRegistry::getRegistry()->getInstance($communicatorType . '_communicator'); + $communicatorInstance = ObjectRegistry::getRegistry('factory')->getInstance($communicatorType . '_communicator'); } else { // Get the communicator instance $communicatorInstance = ObjectFactory::createObjectByConfiguredName($configKey); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($communicatorType . '_communicator', $communicatorInstance); + ObjectRegistry::getRegistry('factory')->addInstance($communicatorType . '_communicator', $communicatorInstance); } // Return the instance diff --git a/application/hub/classes/factories/decoder/class_DecoderFactory.php b/application/hub/classes/factories/decoder/class_DecoderFactory.php index 4e2ed6011..c9b4ad66c 100644 --- a/application/hub/classes/factories/decoder/class_DecoderFactory.php +++ b/application/hub/classes/factories/decoder/class_DecoderFactory.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for Decodeable objects @@ -51,9 +51,9 @@ class DecoderFactory extends BaseFactory { */ public static final function createPackageDecoderInstance () { // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('package_decoder')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('package_decoder')) { // Get handler from registry - $decoderInstance = GenericRegistry::getRegistry()->getInstance('package_decoder'); + $decoderInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_decoder'); } else { // Get a chunk handler instance $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance(); @@ -62,7 +62,7 @@ class DecoderFactory extends BaseFactory { $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($handlerInstance)); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('package_decoder', $decoderInstance); + ObjectRegistry::getRegistry('factory')->addInstance('package_decoder', $decoderInstance); } // Return the instance diff --git a/application/hub/classes/factories/dht/class_DhtObjectFactory.php b/application/hub/classes/factories/dht/class_DhtObjectFactory.php index f3d722ce6..bec1c32be 100644 --- a/application/hub/classes/factories/dht/class_DhtObjectFactory.php +++ b/application/hub/classes/factories/dht/class_DhtObjectFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Dht; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -60,15 +60,15 @@ class DhtObjectFactory extends BaseFactory { $name = $prefix . '_dht'; // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists($name)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($name)) { // Get handler from registry - $dhtInstance = GenericRegistry::getRegistry()->getInstance($name); + $dhtInstance = ObjectRegistry::getRegistry('factory')->getInstance($name); } else { // Get the handler instance $dhtInstance = ObjectFactory::createObjectByConfiguredName($name . '_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($name, $dhtInstance); + ObjectRegistry::getRegistry('factory')->addInstance($name, $dhtInstance); } // Return the instance diff --git a/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php b/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php index 5afb10da8..0c9a3e9b1 100644 --- a/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php +++ b/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Discovery\Package; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for package discovery @@ -49,15 +49,15 @@ class PackageDiscoveryFactory extends BaseFactory { */ public static final function createPackageDiscoveryInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('package_discovery')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('package_discovery')) { // Then use this instance - $discoveryInstance = GenericRegistry::getRegistry()->getInstance('package_discovery'); + $discoveryInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_discovery'); } else { // Create a new instance $discoveryInstance = ObjectFactory::createObjectByConfiguredName('package_recipient_discovery_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('package_discovery', $discoveryInstance); + ObjectRegistry::getRegistry('factory')->addInstance('package_discovery', $discoveryInstance); } // Return the instance diff --git a/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php b/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php index 7053deb8d..25251ac52 100644 --- a/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php +++ b/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Discovery\Socket; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for socket discovery @@ -49,15 +49,15 @@ class SocketDiscoveryFactory extends BaseFactory { */ public static final function createSocketDiscoveryInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('socket_discovery')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('socket_discovery')) { // Then use this instance - $discoveryInstance = GenericRegistry::getRegistry()->getInstance('socket_discovery'); + $discoveryInstance = ObjectRegistry::getRegistry('factory')->getInstance('socket_discovery'); } else { // Create a new instance $discoveryInstance = ObjectFactory::createObjectByConfiguredName('socket_discovery_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('socket_discovery', $discoveryInstance); + ObjectRegistry::getRegistry('factory')->addInstance('socket_discovery', $discoveryInstance); } // Return the instance diff --git a/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php b/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php index 822bf960d..ba0d455e6 100644 --- a/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Message; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -62,15 +62,15 @@ class MessageTypeHandlerFactory extends BaseFactory { $registryKey = sprintf('message_type_%s_handler', $messageType); // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists($registryKey)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) { // Then use this instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance($registryKey); + $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey); } else { // Now prepare the tags instance $handlerInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance($registryKey, $handlerInstance); + ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $handlerInstance); } // Return the instance diff --git a/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php b/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php index ea7a9eab6..b25ef3214 100644 --- a/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Network; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for network packages @@ -49,9 +49,9 @@ class NetworkPackageHandlerFactory extends BaseFactory { */ public static final function createNetworkPackageHandlerInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('network_package_handler')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('network_package_handler')) { // Then use this instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('network_package_handler'); + $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('network_package_handler'); } else { /* * Prepare the compressor for our package, ZLIB should be fine but we @@ -70,7 +70,7 @@ class NetworkPackageHandlerFactory extends BaseFactory { $handlerInstance = ObjectFactory::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance)); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('network_package_handler', $handlerInstance); + ObjectRegistry::getRegistry('factory')->addInstance('network_package_handler', $handlerInstance); } // Return the instance diff --git a/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php b/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php index 1225645ef..9e0e82958 100644 --- a/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for protocol handlers @@ -55,15 +55,15 @@ class ProtocolHandlerFactory extends BaseFactory { */ private static function createProtocolHandlerByType (string $protocolType) { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists($protocolType . '_protocol_handler')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($protocolType . '_protocol_handler')) { // Then use this instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance($protocolType . '_protocol_handler'); + $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance($protocolType . '_protocol_handler'); } else { // Now prepare the tags instance $handlerInstance = ObjectFactory::createObjectByConfiguredName($protocolType . '_protocol_handler_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance($protocolType . '_protocol_handler', $handlerInstance); + ObjectRegistry::getRegistry('factory')->addInstance($protocolType . '_protocol_handler', $handlerInstance); } // Return the instance diff --git a/application/hub/classes/factories/info/class_ConnectionInfoFactory.php b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php index 74daee0c0..5f169370b 100644 --- a/application/hub/classes/factories/info/class_ConnectionInfoFactory.php +++ b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Container\Socket\StorableSocket; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -89,10 +89,10 @@ class ConnectionInfoFactory extends BaseFactory { // If there is no info? /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: key=%s', $key)); - if (GenericRegistry::getRegistry()->instanceExists($key)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($key)) { // Get info from registry /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Getting instance for key=%s ...', $key)); - $infoInstance = GenericRegistry::getRegistry()->getInstance($key); + $infoInstance = ObjectRegistry::getRegistry('factory')->getInstance($key); } else { // Get the info instance /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Creating info instance for connectionType=%s ...', $connectionType)); @@ -100,7 +100,7 @@ class ConnectionInfoFactory extends BaseFactory { // Add it to the registry /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-INFO-FACTORY: Adding key=%s,infoInstance=%s ...', $key, $infoInstance->__toString())); - GenericRegistry::getRegistry()->addInstance($key, $infoInstance); + ObjectRegistry::getRegistry('factory')->addInstance($key, $infoInstance); } // Return the instance diff --git a/application/hub/classes/factories/lists/class_RecipientListFactory.php b/application/hub/classes/factories/lists/class_RecipientListFactory.php index 399785194..5f7554de1 100644 --- a/application/hub/classes/factories/lists/class_RecipientListFactory.php +++ b/application/hub/classes/factories/lists/class_RecipientListFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Lists\Recipient; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for recipient lists @@ -49,15 +49,15 @@ class RecipientListFactory extends BaseFactory { */ public static final function createRecipientListInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('recipient_list')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('recipient_list')) { // Then use this instance - $listInstance = GenericRegistry::getRegistry()->getInstance('recipient_list'); + $listInstance = ObjectRegistry::getRegistry('factory')->getInstance('recipient_list'); } else { // Create a new instance $listInstance = ObjectFactory::createObjectByConfiguredName('recipient_list_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('recipient_list', $listInstance); + ObjectRegistry::getRegistry('factory')->addInstance('recipient_list', $listInstance); } // Return the instance diff --git a/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php b/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php index e1a474a35..102c85fe1 100644 --- a/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php +++ b/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Network\Locator; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -58,9 +58,9 @@ class UniversalNodeLocatorFactory extends BaseFactory { } // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('unl_' . $unl)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('unl_' . $unl)) { // Get handler from registry - $locatorInstance = GenericRegistry::getRegistry()->getInstance('unl_' . $unl); + $locatorInstance = ObjectRegistry::getRegistry('factory')->getInstance('unl_' . $unl); } else { // Get the handler instance $locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class'); @@ -69,7 +69,7 @@ class UniversalNodeLocatorFactory extends BaseFactory { $locatorInstance->parseStringAsUnl($unl); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('unl_' . $unl, $locatorInstance); + ObjectRegistry::getRegistry('factory')->addInstance('unl_' . $unl, $locatorInstance); } // Trace message diff --git a/application/hub/classes/factories/node/class_NodeObjectFactory.php b/application/hub/classes/factories/node/class_NodeObjectFactory.php index 346ea2b15..c92ec5fb9 100644 --- a/application/hub/classes/factories/node/class_NodeObjectFactory.php +++ b/application/hub/classes/factories/node/class_NodeObjectFactory.php @@ -2,12 +2,15 @@ // Own namespace namespace Org\Shipsimu\Hub\Factory\Node; +// Import application-specific stuff +use Org\Shipsimu\Hub\Factory\Parameter\FactoryRequiredParameterException; + // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils; @@ -59,11 +62,11 @@ class NodeObjectFactory extends BaseFactory { $factoryInstance = new NodeObjectFactory(); // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('node')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('node')) { // Get handler from registry //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FACTORY: Getting node instance from registry ...'); - $nodeInstance = GenericRegistry::getRegistry()->getInstance('node'); + $nodeInstance = ObjectRegistry::getRegistry('factory')->getInstance('node'); } elseif (($requestInstance instanceof Requestable) && ($responseInstance instanceof Responseable)) { // The default node-mode is from our configuration //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-FACTORY: requestInstance and responseInstance are both set.'); @@ -100,7 +103,7 @@ class NodeObjectFactory extends BaseFactory { // Add it to the registry //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NODE-FACTORY: Adding nodeInstance=%s to registry ...', $nodeInstance->__toString())); - GenericRegistry::getRegistry()->addInstance('node', $nodeInstance); + ObjectRegistry::getRegistry('factory')->addInstance('node', $nodeInstance); } else { // Throw an exception here throw new FactoryRequiredParameterException($factoryInstance, self::EXCEPTION_FACTORY_REQUIRE_PARAMETER); diff --git a/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php b/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php index abf09f7cc..11dd9bff0 100644 --- a/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php +++ b/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Network\Receive\Receivable; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for package assembler @@ -53,15 +53,15 @@ class PackageAssemblerFactory extends BaseFactory { */ public static final function createAssemblerInstance (Receivable $handlerInstance) { // If there is no assembler? - if (GenericRegistry::getRegistry()->instanceExists('package_assembler')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('package_assembler')) { // Get assembler from registry - $assemblerInstance = GenericRegistry::getRegistry()->getInstance('package_assembler'); + $assemblerInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_assembler'); } else { // Get the assembler instance $assemblerInstance = ObjectFactory::createObjectByConfiguredName('package_assembler_class', array($handlerInstance)); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('package_assembler', $assemblerInstance); + ObjectRegistry::getRegistry('factory')->addInstance('package_assembler', $assemblerInstance); } // Return the instance diff --git a/application/hub/classes/factories/package/class_NetworkPackageFactory.php b/application/hub/classes/factories/package/class_NetworkPackageFactory.php index e79ab1541..c1eac4bd6 100644 --- a/application/hub/classes/factories/package/class_NetworkPackageFactory.php +++ b/application/hub/classes/factories/package/class_NetworkPackageFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Network; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for network packages @@ -49,9 +49,9 @@ class NetworkPackageFactory extends BaseFactory { */ public static final function createNetworkPackageHandlerInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('network_package')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('network_package')) { // Then use this instance - $packageInstance = GenericRegistry::getRegistry()->getInstance('network_package'); + $packageInstance = ObjectRegistry::getRegistry('factory')->getInstance('network_package'); } else { /* * Prepare the compressor for our package, ZLIB should be fine but we @@ -70,7 +70,7 @@ class NetworkPackageFactory extends BaseFactory { $packageInstance = ObjectFactory::createObjectByConfiguredName('network_package_class', array($compressorInstance)); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('network_package', $packageInstance); + ObjectRegistry::getRegistry('factory')->addInstance('network_package', $packageInstance); } // Return the instance diff --git a/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php b/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php index b56436846..40d572d83 100644 --- a/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php +++ b/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Fragmenter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -59,15 +59,15 @@ class FragmenterFactory extends BaseFactory { } // If there is no fragmenter? - if (GenericRegistry::getRegistry()->instanceExists($fragmenterType . '_fragmenter')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($fragmenterType . '_fragmenter')) { // Get fragmenter from registry - $fragmenterInstance = GenericRegistry::getRegistry()->getInstance($fragmenterType . '_fragmenter'); + $fragmenterInstance = ObjectRegistry::getRegistry('factory')->getInstance($fragmenterType . '_fragmenter'); } else { // Get the fragmenter instance $fragmenterInstance = ObjectFactory::createObjectByConfiguredName($fragmenterType . '_fragmenter_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance); + ObjectRegistry::getRegistry('factory')->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance); } // Return the instance diff --git a/application/hub/classes/factories/producer/class_ProducerFactory.php b/application/hub/classes/factories/producer/class_ProducerFactory.php index 808cd434b..532176539 100644 --- a/application/hub/classes/factories/producer/class_ProducerFactory.php +++ b/application/hub/classes/factories/producer/class_ProducerFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Producer; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for producer @@ -51,15 +51,15 @@ class ProducerFactory extends BaseFactory { */ public static final function createProducerInstance (string $configEntry, string $producerType) { // If there is no producer? - if (GenericRegistry::getRegistry()->instanceExists($producerType . '_producer')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($producerType . '_producer')) { // Get producer from registry - $producerInstance = GenericRegistry::getRegistry()->getInstance($producerType . '_producer'); + $producerInstance = ObjectRegistry::getRegistry('factory')->getInstance($producerType . '_producer'); } else { // Get the producer instance $producerInstance = ObjectFactory::createObjectByConfiguredName($configEntry); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($producerType . '_producer', $producerInstance); + ObjectRegistry::getRegistry('factory')->addInstance($producerType . '_producer', $producerInstance); } // Return the instance diff --git a/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php b/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php index 4bfee19f0..963cb8494 100644 --- a/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php +++ b/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Registry\Object; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for network packages @@ -47,15 +47,15 @@ class ObjectTypeRegistryFactory extends BaseFactory { */ public static final function createObjectTypeRegistryInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('object_type_registry')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('object_type_registry')) { // Then use this instance - $registryInstance = GenericRegistry::getRegistry()->getInstance('object_type_registry'); + $registryInstance = ObjectRegistry::getRegistry('factory')->getInstance('object_type_registry'); } else { // Now prepare the tags instance $registryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('object_type_registry', $registryInstance); + ObjectRegistry::getRegistry('factory')->addInstance('object_type_registry', $registryInstance); } // Return the instance diff --git a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php index 859ea4077..b5bc7f2ad 100644 --- a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php +++ b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Factory\Resolver\Protocol; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for ProtocolResolver @@ -51,15 +51,15 @@ class ProtocolResolverFactory extends BaseFactory { $protocolName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hub_communication_protocol_type'); // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists($protocolName . '_protocol_resolver')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($protocolName . '_protocol_resolver')) { // Get handler from registry - $resolverInstance = GenericRegistry::getRegistry()->getInstance($protocolName . '_protocol_resolver'); + $resolverInstance = ObjectRegistry::getRegistry('factory')->getInstance($protocolName . '_protocol_resolver'); } else { // Get the handler instance $resolverInstance = ObjectFactory::createObjectByConfiguredName($protocolName . '_protocol_resolver_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($protocolName . '_protocol_resolver', $resolverInstance); + ObjectRegistry::getRegistry('factory')->addInstance($protocolName . '_protocol_resolver', $resolverInstance); } // Return the instance diff --git a/application/hub/classes/factories/socket/class_SocketFactory.php b/application/hub/classes/factories/socket/class_SocketFactory.php index f74dc2152..cafb1e9e0 100644 --- a/application/hub/classes/factories/socket/class_SocketFactory.php +++ b/application/hub/classes/factories/socket/class_SocketFactory.php @@ -15,7 +15,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; // Import SPL stuff @@ -79,9 +79,9 @@ class SocketFactory extends BaseFactory { // Is the key there? /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: Trying to find a socket with registryKey=%s', $registryKey)); - if (GenericRegistry::getRegistry()->instanceExists($registryKey)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists($registryKey)) { // Get container instance - $socketInstance = GenericRegistry::getRegistry()->getInstance($registryKey); + $socketInstance = ObjectRegistry::getRegistry('factory')->getInstance($registryKey); // Debug message /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-FACTORY: Using socketResource[%s]=%s from registry.', gettype($socketInstance->getSocketResource()), $socketInstance->getSocketResource())); @@ -90,7 +90,7 @@ class SocketFactory extends BaseFactory { $socketInstance = ObjectFactory::createObjectByConfiguredName(sprintf('%s_connection_helper_class', $protocolInstance->getProtocolName()), array($packageInstance)); // Register it with the registry - GenericRegistry::getRegistry()->addInstance($registryKey, $socketInstance); + ObjectRegistry::getRegistry('factory')->addInstance($registryKey, $socketInstance); // Debug message /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Socket is now registered in registry.'); @@ -419,15 +419,15 @@ class SocketFactory extends BaseFactory { $socketProtocol = $socketInstance->getSocketProtocol(); // Is the an iterator instance? - if (!GenericRegistry::getRegistry()->instanceExists('pool_iterator_' . $socketProtocol)) { + if (!ObjectRegistry::getRegistry('factory')->instanceExists('pool_iterator_' . $socketProtocol)) { // Create iterator instance $iteratorInstance = $poolInstance->createListIteratorInstance($socketProtocol . '_pool'); // Now store it in registry - GenericRegistry::getRegistry()->addInstance('pool_iterator', $iteratorInstance); + ObjectRegistry::getRegistry('factory')->addInstance('pool_iterator', $iteratorInstance); } else { // Get iterator from registry - $iteratorInstance = GenericRegistry::getRegistry()->getInstance('pool_iterator_' . $socketProtocol); + $iteratorInstance = ObjectRegistry::getRegistry('factory')->getInstance('pool_iterator_' . $socketProtocol); } // Is it valid? diff --git a/application/hub/classes/factories/source/units/class_UnitSourceFactory.php b/application/hub/classes/factories/source/units/class_UnitSourceFactory.php index 2fcf12af7..7d9505241 100644 --- a/application/hub/classes/factories/source/units/class_UnitSourceFactory.php +++ b/application/hub/classes/factories/source/units/class_UnitSourceFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Crawler\Source\Unit; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -57,7 +57,7 @@ class UnitSourceFactory extends BaseFactory { } // Do we have cache? - if (!GenericRegistry::getRegistry()->instanceExists($unitType . '_unit_source')) { + if (!ObjectRegistry::getRegistry('factory')->instanceExists($unitType . '_unit_source')) { // Then construct the class' configuraton entry $className = '' . $unitType . '_unit_source_class'; @@ -65,10 +65,10 @@ class UnitSourceFactory extends BaseFactory { $sourceInstance = ObjectFactory::createObjectByConfiguredName($className); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($unitType . '_unit_source', $sourceInstance); + ObjectRegistry::getRegistry('factory')->addInstance($unitType . '_unit_source', $sourceInstance); } else { // Get it from registry - $sourceInstance = GenericRegistry::getRegistry()->getInstance($unitType . '_unit_source'); + $sourceInstance = ObjectRegistry::getRegistry('factory')->getInstance($unitType . '_unit_source'); } // For any purposes, return the source instance diff --git a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php index bbd8fdce4..c3c136bb2 100644 --- a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php +++ b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Crawler\Source\Url; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\Taskable; /** @@ -52,7 +52,7 @@ class UrlSourceObjectFactory extends BaseFactory { $factoryInstance = new UrlSourceObjectFactory(); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('task_handler'); // Get source type by looking for given task instance in task handler $sourceType = $handlerInstance->searchTask($taskInstance); @@ -61,15 +61,15 @@ class UrlSourceObjectFactory extends BaseFactory { assert(!empty($sourceType)); // If there is no handler? - if (GenericRegistry::getRegistry()->instanceExists('source_' . $sourceType)) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('source_' . $sourceType)) { // Get handler from registry - $sourceInstance = GenericRegistry::getRegistry()->getInstance('source_' . $sourceType); + $sourceInstance = ObjectRegistry::getRegistry('factory')->getInstance('source_' . $sourceType); } else { // Get the source instance $sourceInstance = ObjectFactory::createObjectByConfiguredName($sourceType . '_class'); // Add it to the registry - GenericRegistry::getRegistry()->addInstance('source_' . $sourceType, $sourceInstance); + ObjectRegistry::getRegistry('factory')->addInstance('source_' . $sourceType, $sourceInstance); } // Return the instance diff --git a/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php b/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php index 01fae9fe1..9cc9efffe 100644 --- a/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php +++ b/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Crawler\Factory\State; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -61,7 +61,7 @@ class CrawlerStateFactory extends BaseFactory { $stateInstance = ObjectFactory::createObjectByConfiguredName('crawler_' . $stateName . '_state_class'); // Get crawler instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('factory')->getInstance('crawler'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-STATE-FACTORY: Crawler state has changed from ' . $crawlerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php b/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php index 54b50fdec..9d2c409d8 100644 --- a/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php +++ b/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\State\Cruncher; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -58,7 +58,7 @@ class CruncherStateFactory extends BaseFactory { } // Get cruncher instance from registry - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('factory')->getInstance('cruncher'); // Get a class from that configuration entry $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('cruncher_%s_state_class', $stateName)); diff --git a/application/hub/classes/factories/states/miner/class_MinerStateFactory.php b/application/hub/classes/factories/states/miner/class_MinerStateFactory.php index 6daf8042a..56969a1cd 100644 --- a/application/hub/classes/factories/states/miner/class_MinerStateFactory.php +++ b/application/hub/classes/factories/states/miner/class_MinerStateFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\State\Miner; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; // Import SPL stuff use \InvalidArgumentException; @@ -58,7 +58,7 @@ class MinerStateFactory extends BaseFactory { } // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('factory')->getInstance('miner'); // Get a class from that configuration entry $stateInstance = ObjectFactory::createObjectByConfiguredName('miner_' . $stateName . '_state_class'); diff --git a/application/hub/classes/factories/tags/class_PackageTagsFactory.php b/application/hub/classes/factories/tags/class_PackageTagsFactory.php index 8cd93ae41..aaafb8dd6 100644 --- a/application/hub/classes/factories/tags/class_PackageTagsFactory.php +++ b/application/hub/classes/factories/tags/class_PackageTagsFactory.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Factory\Tag\Package; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A factory class for network packages @@ -49,15 +49,15 @@ class PackageTagsFactory extends BaseFactory { */ public static final function createPackageTagsInstance () { // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('package_tags')) { + if (ObjectRegistry::getRegistry('factory')->instanceExists('package_tags')) { // Then use this instance - $packageInstance = GenericRegistry::getRegistry()->getInstance('package_tags'); + $packageInstance = ObjectRegistry::getRegistry('factory')->getInstance('package_tags'); } else { // Now prepare the tags instance $packageInstance = ObjectFactory::createObjectByConfiguredName('package_tags_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('package_tags', $packageInstance); + ObjectRegistry::getRegistry('factory')->addInstance('package_tags', $packageInstance); } // Return the instance diff --git a/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php b/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php index 83e8bbf2b..b07ccb707 100644 --- a/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php +++ b/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class NodeActivationAnnouncementFilter extends BaseNodeFilter implements Filtera */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Prepare a self-test task for the listeners $taskInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_task_class'); diff --git a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php index 9824db0fb..af7c0f8ed 100644 --- a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php +++ b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -78,7 +78,7 @@ class AptProxyInitializationFilter extends BaseAptProxyFilter implements Filtera $proxyInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); // Set the apt_proxy instance in registry - GenericRegistry::getRegistry()->addInstance('apt_proxy', $proxyInstance); + ObjectRegistry::getRegistry('hub')->addInstance('apt_proxy', $proxyInstance); } } diff --git a/application/hub/classes/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php b/application/hub/classes/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php index 06e4fd9a3..e3af90ce9 100644 --- a/application/hub/classes/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php +++ b/application/hub/classes/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class AptProxyWelcomeTeaserFilter extends BaseAptProxyFilter implements Filterab */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Now output the teaser $proxyInstance->outputConsoleTeaser(); diff --git a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrap b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrap index a3a59a947..f8388a394 100644 --- a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrap +++ b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrap @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\AptProxy\; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -65,7 +65,7 @@ class AptProxyBootstrap???Filter extends BaseAptProxyFilter implements Filterabl */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get apt-proxy instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Now do something DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php index 8658a1009..aab49d44f 100644 --- a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php +++ b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class AptProxyBootstrapExtraBootstrappingFilter extends BaseAptProxyFilter imple */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get apt-proxy instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Do some extra bootstrapping steps $proxyInstance->doBootstrapping(); diff --git a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php index a333613a9..46fedc320 100644 --- a/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php +++ b/application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class AptProxyBootstrapGenericActivationFilter extends BaseAptProxyFilter implem */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a apt-proxy instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Set the flag $proxyInstance->enableIsActive(); diff --git a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrap b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrap index 72b9f4eb0..a0a2161f6 100644 --- a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrap +++ b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrap @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Chat\; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -65,7 +65,7 @@ class ChatBootstrap???Filter extends BaseChatFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get chat instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Now do something DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php index 4c01b7e6a..5da5bd443 100644 --- a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php +++ b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class ChatBootstrapExtraBootstrappingFilter extends BaseChatFilter implements Fi */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get chat instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Do some extra bootstrapping steps $chatInstance->doBootstrapping(); diff --git a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php index bc9856ca6..d845a3bd1 100644 --- a/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php +++ b/application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class ChatBootstrapGenericActivationFilter extends BaseChatFilter implements Fil */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a chat instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Set the flag $chatInstance->enableIsActive(); diff --git a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrap b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrap index 6c711e563..e47057004 100644 --- a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrap +++ b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrap @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Crawler\; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -65,7 +65,7 @@ class CrawlerBootstrap???Filter extends BaseCrawlerFilter implements Filterable */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get crawler instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Now do something DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapExtraBootstrappingFilter.php b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapExtraBootstrappingFilter.php index 9ea9b474f..4aec418be 100644 --- a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapExtraBootstrappingFilter.php +++ b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapExtraBootstrappingFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class CrawlerBootstrapExtraBootstrappingFilter extends BaseCrawlerFilter impleme */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get crawler instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Do some extra bootstrapping steps $crawlerInstance->doBootstrapping(); diff --git a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php index e4935d64d..daef9b109 100644 --- a/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php +++ b/application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class CrawlerBootstrapGenericActivationFilter extends BaseCrawlerFilter implemen */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a crawler instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Set the flag $crawlerInstance->enableIsActive(); diff --git a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrap b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrap index 4679d0a3a..01bf37201 100644 --- a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrap +++ b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrap @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Cruncher\; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -65,7 +65,7 @@ class CruncherBootstrap???Filter extends BaseCruncherFilter implements Filterabl */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Now do something DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php index e22a5ea4e..8ebabc6c4 100644 --- a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php +++ b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class CruncherBootstrapBufferQueueInitializerFilter extends BaseCruncherFilter i */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Init all buffer queues $cruncherInstance->initBufferQueues(); diff --git a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php index 57b17f335..3d7936b9c 100644 --- a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php +++ b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class CruncherBootstrapExtraBootstrappingFilter extends BaseCruncherFilter imple */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Do some extra bootstrapping steps $cruncherInstance->doBootstrapping(); diff --git a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php index 152a0db02..d7a5ee75e 100644 --- a/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php +++ b/application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class CruncherBootstrapGenericActivationFilter extends BaseCruncherFilter implem */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Set the flag $cruncherInstance->enableIsActive(); diff --git a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrap b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrap index a29d7d4ae..800f2a1e4 100644 --- a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrap +++ b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrap @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Miner\Filter\BaseMinerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class MinerBootstrap???Filter extends BaseMinerFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Now do something DebugMiddleware::getSelfInstance()->partialStub('Please implement this step.'); diff --git a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php index 9bf5cbd2a..e2424e9a7 100644 --- a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php +++ b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php @@ -4,7 +4,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Queue; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class MinerBootstrapBufferQueueInitializerFilter extends BaseMinerFilter impleme */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Init all buffer queues $minerInstance->initBufferQueues(); diff --git a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapExtraBootstrappingFilter.php b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapExtraBootstrappingFilter.php index f14f60cdb..599f534fa 100644 --- a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapExtraBootstrappingFilter.php +++ b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapExtraBootstrappingFilter.php @@ -4,7 +4,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Extra; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class MinerBootstrapExtraBootstrappingFilter extends BaseMinerFilter implements */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Do some extra bootstrapping steps $minerInstance->doBootstrapping(); diff --git a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php index 53c4621c6..ac78b7742 100644 --- a/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php +++ b/application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php @@ -4,7 +4,7 @@ namespace Org\Shipsimu\Hub\Filter\Bootstrap\Miner\Activation; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +67,7 @@ class MinerBootstrapGenericActivationFilter extends BaseMinerFilter implements F */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get a miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Set the flag $minerInstance->enableIsActive(); diff --git a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php index 696f5409c..6f03a23ce 100644 --- a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php +++ b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -78,7 +78,7 @@ class ChatInitializationFilter extends BaseChatFilter implements Filterable { $chatInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); // Set the chat instance in registry - GenericRegistry::getRegistry()->addInstance('chat', $chatInstance); + ObjectRegistry::getRegistry('hub')->addInstance('chat', $chatInstance); } } diff --git a/application/hub/classes/filter/chat/class_ChatWelcomeTeaserFilter.php b/application/hub/classes/filter/chat/class_ChatWelcomeTeaserFilter.php index 60e742bff..27e8bf917 100644 --- a/application/hub/classes/filter/chat/class_ChatWelcomeTeaserFilter.php +++ b/application/hub/classes/filter/chat/class_ChatWelcomeTeaserFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class ChatWelcomeTeaserFilter extends BaseChatFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Now output the teaser $chatInstance->outputConsoleTeaser(); diff --git a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php index fee0f05fe..8703d61bb 100644 --- a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php +++ b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/filter/crawler/class_CrawlerWelcomeTeaserFilter.php b/application/hub/classes/filter/crawler/class_CrawlerWelcomeTeaserFilter.php index e8cbf0386..59bec3866 100644 --- a/application/hub/classes/filter/crawler/class_CrawlerWelcomeTeaserFilter.php +++ b/application/hub/classes/filter/crawler/class_CrawlerWelcomeTeaserFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class CrawlerWelcomeTeaserFilter extends BaseCrawlerFilter implements Filterable */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Now output the teaser $crawlerInstance->outputConsoleTeaser(); diff --git a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php index fa6bb7468..1633d98a1 100644 --- a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php +++ b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/filter/cruncher/class_CruncherWelcomeTeaserFilter.php b/application/hub/classes/filter/cruncher/class_CruncherWelcomeTeaserFilter.php index aa3d966db..ea539f3d3 100644 --- a/application/hub/classes/filter/cruncher/class_CruncherWelcomeTeaserFilter.php +++ b/application/hub/classes/filter/cruncher/class_CruncherWelcomeTeaserFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class CruncherWelcomeTeaserFilter extends BaseCruncherFilter implements Filterab */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Now output the teaser $cruncherInstance->outputConsoleTeaser(); diff --git a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php index 82f2cef8b..49b383511 100644 --- a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php +++ b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php @@ -10,7 +10,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/filter/miner/class_MinerWelcomeTeaserFilter.php b/application/hub/classes/filter/miner/class_MinerWelcomeTeaserFilter.php index 8f07a7f73..54b3c6bdf 100644 --- a/application/hub/classes/filter/miner/class_MinerWelcomeTeaserFilter.php +++ b/application/hub/classes/filter/miner/class_MinerWelcomeTeaserFilter.php @@ -4,7 +4,7 @@ namespace Org\Shipsimu\Hub\Miner\Filter\WelcomeTeaser; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class MinerWelcomeTeaserFilter extends BaseMinerFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Now output the teaser $minerInstance->outputConsoleTeaser(); diff --git a/application/hub/classes/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php b/application/hub/classes/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php index 000943cc0..c4f0da349 100644 --- a/application/hub/classes/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php +++ b/application/hub/classes/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,7 +69,7 @@ class AptProxyShutdownFilter extends BaseAptProxyFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $proxyInstance = GenericRegistry::getRegistry()->getInstance('apt_proxy'); + $proxyInstance = ObjectRegistry::getRegistry('hub')->getInstance('apt_proxy'); // Shutdown the apt-proxy. This should be the last line $proxyInstance->doShutdown(); diff --git a/application/hub/classes/filter/shutdown/chat/class_ChatShutdownFilter.php b/application/hub/classes/filter/shutdown/chat/class_ChatShutdownFilter.php index a56783256..2b8587f07 100644 --- a/application/hub/classes/filter/shutdown/chat/class_ChatShutdownFilter.php +++ b/application/hub/classes/filter/shutdown/chat/class_ChatShutdownFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,7 +69,7 @@ class ChatShutdownFilter extends BaseChatFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + $chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Shutdown the chat. This should be the last line $chatInstance->doShutdown(); diff --git a/application/hub/classes/filter/shutdown/crawler/class_CrawlerShutdownFilter.php b/application/hub/classes/filter/shutdown/crawler/class_CrawlerShutdownFilter.php index ad9f3dd83..cee9f5ab4 100644 --- a/application/hub/classes/filter/shutdown/crawler/class_CrawlerShutdownFilter.php +++ b/application/hub/classes/filter/shutdown/crawler/class_CrawlerShutdownFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,7 +69,7 @@ class CrawlerShutdownFilter extends BaseCrawlerFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); + $crawlerInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler'); // Shutdown the crawler. This should be the last line $crawlerInstance->doShutdown(); diff --git a/application/hub/classes/filter/shutdown/cruncher/class_CruncherShutdownFilter.php b/application/hub/classes/filter/shutdown/cruncher/class_CruncherShutdownFilter.php index 048492472..8df755a38 100644 --- a/application/hub/classes/filter/shutdown/cruncher/class_CruncherShutdownFilter.php +++ b/application/hub/classes/filter/shutdown/cruncher/class_CruncherShutdownFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,7 +69,7 @@ class CruncherShutdownFilter extends BaseCruncherFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Shutdown the cruncher. This should be the last line $cruncherInstance->doShutdown(); diff --git a/application/hub/classes/filter/shutdown/miner/class_MinerShutdownFilter.php b/application/hub/classes/filter/shutdown/miner/class_MinerShutdownFilter.php index 1d8269639..483f37e04 100644 --- a/application/hub/classes/filter/shutdown/miner/class_MinerShutdownFilter.php +++ b/application/hub/classes/filter/shutdown/miner/class_MinerShutdownFilter.php @@ -4,7 +4,7 @@ namespace Org\Shipsimu\Hub\Filter\Shutdown\Miner; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,7 +69,7 @@ class MinerShutdownFilter extends BaseMinerFilter implements Filterable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get node instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Shutdown the miner. This should be the last line $minerInstance->doShutdown(); diff --git a/application/hub/classes/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php b/application/hub/classes/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php index 97b8b29f2..2c5d3c06c 100644 --- a/application/hub/classes/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php +++ b/application/hub/classes/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -68,7 +68,7 @@ class NodeShutdownTaskHandlerFilter extends BaseNodeFilter implements Filterable */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Shutdown the task manager and all its registered tasks $handlerInstance->doShutdown(); diff --git a/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php index b41d4f91c..3963a731d 100644 --- a/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\AptProxy\Filter\BaseAptProxyFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,13 +69,13 @@ class AptProxyTaskHandlerInitializerFilter extends BaseAptProxyFilter implements */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get apt-proxy instance - //$chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + //$chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Get a new task handler instance $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); /* * Register all tasks: diff --git a/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php index 49164f38e..35ec83c67 100644 --- a/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Chat\Filter\BaseChatFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,13 +69,13 @@ class ChatTaskHandlerInitializerFilter extends BaseChatFilter implements Filtera */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get chat instance - //$chatInstance = GenericRegistry::getRegistry()->getInstance('chat'); + //$chatInstance = ObjectRegistry::getRegistry('hub')->getInstance('chat'); // Get a new task handler instance $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); /* * Register all tasks: diff --git a/application/hub/classes/filter/task/class_BaseCrawlerTaskFilter.php b/application/hub/classes/filter/task/class_BaseCrawlerTaskFilter.php index cbb53b6de..989e231b0 100644 --- a/application/hub/classes/filter/task/class_BaseCrawlerTaskFilter.php +++ b/application/hub/classes/filter/task/class_BaseCrawlerTaskFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -79,7 +79,7 @@ abstract class BaseCrawlerTaskFilter extends BaseCrawlerFilter { $handlerInstance->registerTask('crawler_snippet_extractor', $taskInstance); // Add handler instance to registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('hub')->addInstance('task_handler', $handlerInstance); } } diff --git a/application/hub/classes/filter/task/crawler/class_CrawlerDistributedTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/crawler/class_CrawlerDistributedTaskHandlerInitializerFilter.php index a9d1d9976..c324c3796 100644 --- a/application/hub/classes/filter/task/crawler/class_CrawlerDistributedTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/crawler/class_CrawlerDistributedTaskHandlerInitializerFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\Task\BaseCrawlerTaskFilter; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -73,7 +73,7 @@ class CrawlerDistributedTaskHandlerInitializerFilter extends BaseCrawlerTaskFilt parent::execute($requestInstance, $responseInstance); // Get task handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); /* * Register all tasks for a distributed crawler: diff --git a/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php index af6064e59..8b867f669 100644 --- a/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,13 +69,13 @@ class CruncherTaskHandlerInitializerFilter extends BaseCruncherFilter implements */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get cruncher instance - //$cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + //$cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Get a new task handler instance $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); // Register all tasks: // diff --git a/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php index 768f04568..204c33220 100644 --- a/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\Miner\Handler\Task; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -69,13 +69,13 @@ class MinerTaskHandlerInitializerFilter extends BaseMinerFilter implements Filte */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get miner instance - //$minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + //$minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Get a new task handler instance $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); // Register all tasks: // diff --git a/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php index fa7617326..a091527b4 100644 --- a/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -77,7 +77,7 @@ class NodeTaskHandlerInitializerFilter extends BaseNodeFilter implements Filtera $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); // Put the task handler in registry - GenericRegistry::getRegistry()->addInstance('task_handler', $handlerInstance); + ObjectRegistry::getRegistry('generic')->addInstance('task_handler', $handlerInstance); // Prepare a package-tags initialization task for the listeners $taskInstance = ObjectFactory::createObjectByConfiguredName('node_package_tags_init_task_class'); diff --git a/application/hub/classes/handler/data/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php b/application/hub/classes/handler/data/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php index a877e4253..83be391ee 100644 --- a/application/hub/classes/handler/data/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php +++ b/application/hub/classes/handler/data/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php @@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Answer\Announcement\XmlAnnouncementAnsw // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** @@ -88,7 +88,7 @@ class NodeAnnouncementAnswerOkayHandler extends BaseAnswerStatusHandler implemen DhtObjectFactory::createDhtInstance('node')->registerNodeByMessageInstance($messageInstance, $this, TRUE); // Get handler instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler'); + $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler'); // Generate DHT bootstrap task $taskInstance = ObjectFactory::createObjectByConfiguredName('node_dht_late_bootstrap_task_class'); diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index c7cba6df0..849f1fd79 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -40,7 +40,7 @@ use Org\Mxchange\CoreFramework\Feature\FrameworkFeature; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; use Org\Mxchange\CoreFramework\State\UnexpectedStateException; @@ -675,7 +675,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei // Get the connection helper from registry /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: Getting helperInstance for connection from registry ...'); - $helperInstance = GenericRegistry::getRegistry()->getInstance('connection'); + $helperInstance = ObjectRegistry::getRegistry('hub')->getInstance('connection'); // Get connection info class /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: stateInstance=%s', $helperInstance->getStateInstance())); diff --git a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php index 2b2029e65..ef09ecf88 100644 --- a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php @@ -20,7 +20,7 @@ use Org\Shipsimu\Hub\Traits\Fragmenter\FragmentableTrait; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Traits\Stream\Output\OutputStreamTrait; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; @@ -118,7 +118,7 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit $this->setPackageHandlerInstance($handlerInstance); // Register this connection helper - GenericRegistry::getRegistry()->addInstance('connection', $this); + ObjectRegistry::getRegistry('hub')->addInstance('connection', $this); // Get the fragmenter instance $fragmenterInstance = FragmenterFactory::createFragmenterInstance('package'); diff --git a/application/hub/classes/miner/class_BaseHubMiner.php b/application/hub/classes/miner/class_BaseHubMiner.php index 64a349fe4..fb7660871 100644 --- a/application/hub/classes/miner/class_BaseHubMiner.php +++ b/application/hub/classes/miner/class_BaseHubMiner.php @@ -13,7 +13,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Updateable; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; /** @@ -98,7 +98,7 @@ abstract class BaseHubMiner extends BaseHubSystem implements Updateable { */ private function initMiner () { // Add own instance to registry - GenericRegistry::getRegistry()->addInstance('miner', $this); + ObjectRegistry::getRegistry('hub')->addInstance('miner', $this); // Init the state MinerStateFactory::createMinerStateInstanceByName('init'); diff --git a/application/hub/classes/nodes/boot/class_HubBootNode.php b/application/hub/classes/nodes/boot/class_HubBootNode.php index b0c783306..4c28cdc93 100644 --- a/application/hub/classes/nodes/boot/class_HubBootNode.php +++ b/application/hub/classes/nodes/boot/class_HubBootNode.php @@ -12,7 +12,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index fa4aaf9f8..706e2b5e5 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -30,7 +30,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; @@ -157,7 +157,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC $this->setCryptoInstance($cryptoInstance); // Set the node instance in registry - GenericRegistry::getRegistry()->addInstance('node', $this); + ObjectRegistry::getRegistry('hub')->addInstance('node', $this); // Init state which sets the state to 'init' $this->initState(); @@ -640,7 +640,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC } // Get the controller here - $controllerInstance = GenericRegistry::getRegistry()->getInstance('controller'); + $controllerInstance = ObjectRegistry::getRegistry('hub')->getInstance('controller'); // Run all filters for the hub activation $controllerInstance->executeActivationFilters($requestInstance, $responseInstance); diff --git a/application/hub/classes/nodes/list/class_HubListNode.php b/application/hub/classes/nodes/list/class_HubListNode.php index cff6f9a2c..f4a05b3dc 100644 --- a/application/hub/classes/nodes/list/class_HubListNode.php +++ b/application/hub/classes/nodes/list/class_HubListNode.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/nodes/master/class_HubMasterNode.php b/application/hub/classes/nodes/master/class_HubMasterNode.php index e2a8a8e8d..71c6bc9b4 100644 --- a/application/hub/classes/nodes/master/class_HubMasterNode.php +++ b/application/hub/classes/nodes/master/class_HubMasterNode.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/nodes/regular/class_HubRegularNode.php b/application/hub/classes/nodes/regular/class_HubRegularNode.php index 6aed54450..62ec1fd23 100644 --- a/application/hub/classes/nodes/regular/class_HubRegularNode.php +++ b/application/hub/classes/nodes/regular/class_HubRegularNode.php @@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/pools/class_BasePool.php b/application/hub/classes/pools/class_BasePool.php index c5000c8d7..59eaa48dd 100644 --- a/application/hub/classes/pools/class_BasePool.php +++ b/application/hub/classes/pools/class_BasePool.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Traits\Listener\ListenableTrait; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; @@ -137,15 +137,15 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable { $visitorInstance->visitPool($this); // Do we have a registry instance for this visitor's iterator? - if (GenericRegistry::getRegistry()->instanceExists($visitorInstance->getVisitorMode() . '_pool_iterator')) { + if (ObjectRegistry::getRegistry('hub')->instanceExists($visitorInstance->getVisitorMode() . '_pool_iterator')) { // Get the instance from registry - $iteratorInstance = GenericRegistry::getRegistry()->getInstance($visitorInstance->getVisitorMode() . '_pool_iterator'); + $iteratorInstance = ObjectRegistry::getRegistry('hub')->getInstance($visitorInstance->getVisitorMode() . '_pool_iterator'); } else { // Get a new iterator instance $iteratorInstance = ObjectFactory::createObjectByConfiguredName($visitorInstance->getVisitorMode() . '_pool_iterator_class', array($this->getPoolEntriesInstance())); // Add it to the registry - GenericRegistry::getRegistry()->addInstance($visitorInstance->getVisitorMode() . '_pool_iterator', $iteratorInstance); + ObjectRegistry::getRegistry('hub')->addInstance($visitorInstance->getVisitorMode() . '_pool_iterator', $iteratorInstance); } // Is it valid? diff --git a/application/hub/classes/producer/cruncher/class_BaseCruncherProducer.php b/application/hub/classes/producer/cruncher/class_BaseCruncherProducer.php index 38a543945..de83e7b41 100644 --- a/application/hub/classes/producer/cruncher/class_BaseCruncherProducer.php +++ b/application/hub/classes/producer/cruncher/class_BaseCruncherProducer.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Producer\Cruncher; use Org\Shipsimu\Hub\Producer\BaseProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A generic cruncher producer class @@ -42,7 +42,7 @@ abstract class BaseCruncherProducer extends BaseProducer { parent::__construct($className); // Get cruncher instance - $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); + $cruncherInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher'); // Change state to next state $cruncherInstance->blockProducerHasInitialized($this); diff --git a/application/hub/classes/producer/miner/class_BaseMinerProducer.php b/application/hub/classes/producer/miner/class_BaseMinerProducer.php index d09e18b87..2e74165db 100644 --- a/application/hub/classes/producer/miner/class_BaseMinerProducer.php +++ b/application/hub/classes/producer/miner/class_BaseMinerProducer.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Miner\Minable; use Org\Shipsimu\Hub\Producer\BaseProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A generic miner producer class @@ -49,7 +49,7 @@ abstract class BaseMinerProducer extends BaseProducer { parent::__construct($className); // Get miner instance - $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); + $minerInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner'); // Change state to next state $minerInstance->blockProducerHasInitialized($this); diff --git a/application/hub/classes/tags/package/class_PackageTags.php b/application/hub/classes/tags/package/class_PackageTags.php index 34ebcc928..6e60a2a32 100644 --- a/application/hub/classes/tags/package/class_PackageTags.php +++ b/application/hub/classes/tags/package/class_PackageTags.php @@ -17,7 +17,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplat use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; /** * A Package tags class diff --git a/application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php b/application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php index 2b0c2da9d..bc16f337a 100644 --- a/application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php +++ b/application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Communicator\CommunicatorFactory; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -81,7 +81,7 @@ class CrawlerNodeCommunicatorTask extends BaseHubTask implements Taskable, Visit $communicatorInstance = CommunicatorFactory::createCommunicatorInstance('crawler_node_communicator_class', 'node'); // Get the current crawler state from registry - $stateInstance = GenericRegistry::getRegistry()->getInstance('crawler')->getStateInstance(); + $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('crawler')->getStateInstance(); // Debug message /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-NODE-COMMUNICATOR-TASK: Executing stateInstance=' . $stateInstance->__toString()); diff --git a/application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php b/application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php index 9512050d8..5bc79f48c 100644 --- a/application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php +++ b/application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Producer\ProducerFactory; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -80,7 +80,7 @@ class CruncherKeyProducerTask extends BaseHubTask implements Taskable, Visitable $producerInstance = ProducerFactory::createProducerInstance('cruncher_key_producer_class', 'key'); // Get the current cruncher state from registry - $stateInstance = GenericRegistry::getRegistry()->getInstance('cruncher')->getStateInstance(); + $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->getStateInstance(); // Debug message /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-KEY-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString()); diff --git a/application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php b/application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php index 42221e29c..ddad57dde 100644 --- a/application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php +++ b/application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Producer\ProducerFactory; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -80,7 +80,7 @@ class CruncherTestUnitProducerTask extends BaseHubTask implements Taskable, Visi $producerInstance = ProducerFactory::createProducerInstance('cruncher_test_unit_producer_class', 'test_unit'); // Get the current cruncher state from registry - $stateInstance = GenericRegistry::getRegistry()->getInstance('cruncher')->getStateInstance(); + $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->getStateInstance(); // Debug message /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-TEST-UNIT-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString()); diff --git a/application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php b/application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php index 41e272f00..22c1da6bd 100644 --- a/application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php +++ b/application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Cruncher\Task\Fetcher\WorkUnit; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -85,7 +85,7 @@ class CruncherWorkUnitFetcherTask extends BaseHubTask implements Taskable, Visit * * Please report any bugs you encounter to me. */ - GenericRegistry::getRegistry()->getInstance('cruncher')->doFetchWorkUnits(); + ObjectRegistry::getRegistry('hub')->getInstance('cruncher')->doFetchWorkUnits(); } /** diff --git a/application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php b/application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php index 986d4b782..bf48d45c7 100644 --- a/application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php +++ b/application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Miner\Task\Fetcher\Block; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -85,7 +85,7 @@ class MinerBlockFetcherTask extends BaseHubTask implements Taskable, Visitable { * * Please report any bugs you encounter to me. */ - GenericRegistry::getRegistry()->getInstance('miner')->doSearchForBlocks(); + ObjectRegistry::getRegistry('hub')->getInstance('miner')->doSearchForBlocks(); } /** diff --git a/application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php b/application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php index 2f6967071..d32342991 100644 --- a/application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php +++ b/application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Producer\ProducerFactory; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -80,7 +80,7 @@ class MinerRealGenesisBlockProducerTask extends BaseHubTask implements Taskable, $producerInstance = ProducerFactory::createProducerInstance('miner_real_genesis_block_producer_class', 'real_unit'); // Get the current miner state from registry - $stateInstance = GenericRegistry::getRegistry()->getInstance('miner')->getStateInstance(); + $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner')->getStateInstance(); // Debug message /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString()); diff --git a/application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php b/application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php index 46bc62816..26ad2e2a1 100644 --- a/application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php +++ b/application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Producer\ProducerFactory; use Org\Shipsimu\Hub\Task\BaseHubTask; // Import framework stuff -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -80,7 +80,7 @@ class MinerTestGenesisBlockProducerTask extends BaseHubTask implements Taskable, $producerInstance = ProducerFactory::createProducerInstance('miner_test_genesis_block_producer_class', 'test_unit'); // Get the current miner state from registry - $stateInstance = GenericRegistry::getRegistry()->getInstance('miner')->getStateInstance(); + $stateInstance = ObjectRegistry::getRegistry('hub')->getInstance('miner')->getStateInstance(); // Debug message /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-TEST-GENESIS-BLOCK-PRODUCER-TASK: Executing stateInstance=' . $stateInstance->__toString()); diff --git a/application/hub/classes/template/xml/objects/class_XmlObjectRegistryTemplateEngine.php b/application/hub/classes/template/xml/objects/class_XmlObjectRegistryTemplateEngine.php index b8bd65388..077e751aa 100644 --- a/application/hub/classes/template/xml/objects/class_XmlObjectRegistryTemplateEngine.php +++ b/application/hub/classes/template/xml/objects/class_XmlObjectRegistryTemplateEngine.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory; // Import framework stuff use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine; use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate; diff --git a/core b/core index bfe1b8bbc..d80aa0602 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit bfe1b8bbcc74881eb34f03922f29c6e2d642bc6b +Subproject commit d80aa06027f7eafcabc7c5e307d2126456a6dc0a -- 2.39.5