From 40ad72f9b87e12a73bf74ffda16aff06b8fecf15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 19 May 2017 02:20:43 +0200 Subject: [PATCH] Next larger wave: - imported all (?) object factories - created more namespaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../commands/console/class_HubConsoleAptProxyCommand.php | 1 + .../commands/console/class_HubConsoleChatCommand.php | 1 + .../commands/console/class_HubConsoleCrawlerCommand.php | 1 + .../commands/console/class_HubConsoleCruncherCommand.php | 1 + .../commands/console/class_HubConsoleMainCommand.php | 1 + .../commands/console/class_HubConsoleMinerCommand.php | 1 + .../classes/commands/html/class_HubHtmlIndexCommand.php | 1 + .../console/class_HubConsoleDefaultNewsController.php | 1 + .../classes/cruncher/mcrypt/class_HubMcryptCruncher.php | 1 + .../cruncher/class_CruncherUnitDatabaseWrapper.php | 6 ++++++ .../class_NodeDistributedHashTableDatabaseWrapper.php | 3 +++ .../node/class_NodeInformationDatabaseWrapper.php | 1 + .../states/class_PeerStateLookupDatabaseWrapper.php | 5 ++++- application/hub/classes/dht/node/class_NodeDhtFacade.php | 3 +++ .../factories/chain/class_PackageFilterChainFactory.php | 6 ++++++ .../factories/chunks/class_ChunkHandlerFactory.php | 6 ++++++ .../factories/communicator/class_CommunicatorFactory.php | 6 ++++++ .../classes/factories/decoder/class_DecoderFactory.php | 6 ++++++ .../discovery/class_PackageDiscoveryFactory.php | 6 ++++++ .../factories/discovery/class_SocketDiscoveryFactory.php | 6 ++++++ .../handler/class_MessageTypeHandlerFactory.php | 6 ++++++ .../factories/handler/class_ProtocolHandlerFactory.php | 5 +++++ .../factories/info/class_ConnectionInfoFactory.php | 6 ++++++ .../factories/lists/class_RecipientListFactory.php | 6 ++++++ .../classes/factories/node/class_NodeObjectFactory.php | 1 + .../package/assembler/class_PackageAssemblerFactory.php | 6 ++++++ .../factories/package/class_NetworkPackageFactory.php | 6 ++++++ .../package/fragmenter/class_FragmenterFactory.php | 6 ++++++ .../classes/factories/producer/class_ProducerFactory.php | 6 ++++++ .../registry/class_ObjectTypeRegistryFactory.php | 6 ++++++ .../factories/resolver/class_ProtocolResolverFactory.php | 1 + .../factories/scanner/class_ScannerObjectFactory.php | 6 ++++++ .../hub/classes/factories/socket/class_SocketFactory.php | 1 + .../factories/source/units/class_UnitSourceFactory.php | 6 ++++++ .../source/url/class_UrlSourceObjectFactory.php | 8 +++++++- .../communicator/class_CommunicatorStateFactory.php | 6 ++++++ .../states/crawler/class_CrawlerStateFactory.php | 6 ++++++ .../states/cruncher/class_CruncherStateFactory.php | 6 ++++++ .../factories/states/dht/class_DhtStateFactory.php | 6 ++++++ .../factories/states/miner/class_MinerStateFactory.php | 6 ++++++ .../factories/states/node/class_NodeStateFactory.php | 3 +++ .../factories/states/peer/class_PeerStateFactory.php | 6 ++++++ .../classes/factories/tags/class_PackageTagsFactory.php | 6 ++++++ .../node/class_NodeActivationAnnouncementFilter.php | 1 + .../apt-proxy/class_AptProxyInitializationFilter.php | 1 + .../filter/chat/class_ChatInitializationFilter.php | 1 + .../filter/crawler/class_CrawlerInitializationFilter.php | 1 + .../cruncher/class_CruncherInitializationFilter.php | 1 + .../filter/miner/class_MinerInitializationFilter.php | 1 + .../class_AptProxyTaskHandlerInitializerFilter.php | 1 + .../task/chat/class_ChatTaskHandlerInitializerFilter.php | 1 + .../class_CrawlerTaskHandlerInitializerFilter.php | 1 + .../class_CruncherTaskHandlerInitializerFilter.php | 1 + .../miner/class_MinerTaskHandlerInitializerFilter.php | 1 + .../task/node/class_NodeTaskHandlerInitializerFilter.php | 1 + .../hub/classes/handler/chunks/class_ChunkHandler.php | 9 +++++++++ .../helper/connection/class_BaseConnectionHelper.php | 9 +++++++++ .../crypto/class_CryptoRandomUnitMessageHelper.php | 6 ++++++ .../hub/classes/listener/tcp/class_TcpListener.php | 6 ++++++ .../hub/classes/listener/udp/class_UdpListener.php | 6 ++++++ .../hub/classes/lists/pool/class_PoolEntriesList.php | 6 ++++++ .../hub/classes/miner/chash/class_HubCoinMiner.php | 1 + application/hub/classes/nodes/boot/class_HubBootNode.php | 1 + application/hub/classes/nodes/list/class_HubListNode.php | 1 + .../hub/classes/nodes/master/class_HubMasterNode.php | 1 + .../hub/classes/nodes/regular/class_HubRegularNode.php | 1 + .../classes/package/assembler/class_PackageAssembler.php | 3 +++ application/hub/classes/package/class_NetworkPackage.php | 1 + .../package/fragmenter/class_PackageFragmenter.php | 3 +++ .../classes/pools/listener/class_DefaultListenerPool.php | 6 ++++++ .../producer/cruncher/keys/class_CruncherKeyProducer.php | 6 ++++++ .../work_units/class_CruncherTestUnitProducer.php | 6 ++++++ .../miner/blocks/class_MinerRealGenesisBlockProducer.php | 6 ++++++ .../hub/classes/recipient/dht/class_DhtRecipient.php | 6 ++++++ .../hub/classes/registry/socket/class_SocketRegistry.php | 6 ++++++ .../resolver/protocol/tcp/class_TcpProtocolResolver.php | 6 ++++++ .../classes/resolver/state/class_BaseStateResolver.php | 6 ++++++ .../hub/classes/source/units/class_TestUnitSource.php | 6 ++++++ .../source/urls/class_CrawlerUploadedListUrlSource.php | 6 ++++++ .../classes/tasks/crawler/class_BaseUrlSourceTask.php | 6 ++++++ .../class_CrawlerUploadedListScannerTask.php | 6 ++++++ 81 files changed, 320 insertions(+), 2 deletions(-) diff --git a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php index 839a82b66..fec457461 100644 --- a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php index 43e94f098..ecfc236a8 100644 --- a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php index 4bafac6d0..713662ef6 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php index b8da2bc15..87689b593 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php index db9deed0e..2d4ac91a4 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php @@ -8,6 +8,7 @@ use Hub\Factory\Node\NodeObjectFactory; // Import framework stuff use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Controller\Controller; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; diff --git a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php index 9e0d72f4a..6e73dc9ea 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php b/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php index 82efd47fb..95f04f901 100644 --- a/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php +++ b/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php @@ -6,6 +6,7 @@ namespace Hub\Command; use CoreFramework\Command\BaseCommand; use CoreFramework\Command\Commandable; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php b/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php index 32c98b6c8..7786a60d3 100644 --- a/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php +++ b/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php @@ -5,6 +5,7 @@ namespace Hub\Controller; // Import framework stuff use CoreFramework\Controller\BaseController; use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\Command\CommandResolver; use CoreFramework\Response\Responseable; diff --git a/application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php b/application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php index 600d6babc..c35977bbe 100644 --- a/application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php +++ b/application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php @@ -4,6 +4,7 @@ namespace Hub\Cruncher\Mcrypt; // Import framework stuff use CoreFramework\Controller\Controller; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Response\Responseable; /** diff --git a/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseWrapper.php b/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseWrapper.php index 9beb90018..eefacad0b 100644 --- a/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseWrapper.php +++ b/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseWrapper.php @@ -1,4 +1,10 @@ getInstance('source_' . $sourceType); } else { // Get the source instance - $sourceInstance = ObjectFactory::createObjectByConfiguredName($sourceType . '_class'); + $sourceInstance = self::createObjectByConfiguredName($sourceType . '_class'); // Add it to the registry Registry::getRegistry()->addInstance('source_' . $sourceType, $sourceInstance); diff --git a/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php b/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php index 6cdfc6a76..affed62bd 100644 --- a/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php +++ b/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php @@ -1,4 +1,10 @@