From 4ef950338a3974e95282dde87c25fe483e352b3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 7 Dec 2020 09:27:16 +0100 Subject: [PATCH] Continued: - moved ObjectFactory into deeper namespace - also it is now final, please extend BaseFactory instead MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/hub/class_ApplicationHelper.php | 2 +- .../class_HubConsoleAptProxyCommand.php | 2 +- .../console/class_HubConsoleChatCommand.php | 2 +- .../class_HubConsoleCrawlerCommand.php | 2 +- .../class_HubConsoleCruncherCommand.php | 2 +- .../console/class_HubConsoleMainCommand.php | 2 +- .../console/class_HubConsoleMinerCommand.php | 2 +- .../html/class_HubHtmlIndexCommand.php | 2 +- .../socket/class_SocketContainer.php | 2 +- .../class_HubConsoleDefaultNewsController.php | 2 +- .../cruncher/class_BaseHubCruncher.php | 2 +- .../openssl/class_HubOpenSslCruncher.php | 2 +- .../class_CruncherUnitDatabaseFrontend.php | 2 +- ...deDistributedHashTableDatabaseFrontend.php | 2 +- .../class_NodeInformationDatabaseFrontend.php | 2 +- .../class_PeerStateLookupDatabaseFrontend.php | 2 +- application/hub/classes/dht/class_BaseDht.php | 2 +- .../classes/dht/node/class_NodeDhtFacade.php | 2 +- .../class_PackageRecipientDiscovery.php | 2 +- .../chain/class_PackageFilterChainFactory.php | 9 ++++--- .../chunks/class_ChunkHandlerFactory.php | 7 ++--- application/hub/classes/factories/class_ | 2 +- .../factories/client/class_ClientFactory.php | 7 ++--- .../class_CommunicatorFactory.php | 7 ++--- .../decoder/class_DecoderFactory.php | 7 ++--- .../factories/dht/class_DhtObjectFactory.php | 7 ++--- .../class_PackageDiscoveryFactory.php | 7 ++--- .../class_SocketDiscoveryFactory.php | 7 ++--- .../class_MessageTypeHandlerFactory.php | 27 ++++++++++++++----- .../class_NetworkPackageHandlerFactory.php | 11 ++++---- .../handler/class_ProtocolHandlerFactory.php | 14 +++++----- .../info/class_ConnectionInfoFactory.php | 4 +-- .../lists/class_RecipientListFactory.php | 7 ++--- .../class_UniversalNodeLocatorFactory.php | 26 +++++++++++------- .../node/class_NodeObjectFactory.php | 5 ++-- .../class_PackageAssemblerFactory.php | 7 ++--- .../package/class_NetworkPackageFactory.php | 11 ++++---- .../fragmenter/class_FragmenterFactory.php | 7 ++--- .../producer/class_ProducerFactory.php | 7 ++--- .../class_ObjectTypeRegistryFactory.php | 7 ++--- .../class_ProtocolResolverFactory.php | 7 ++--- .../factories/socket/class_SocketFactory.php | 11 ++++---- .../source/units/class_UnitSourceFactory.php | 18 ++++++++++--- .../url/class_UrlSourceObjectFactory.php | 7 ++--- .../class_CommunicatorStateFactory.php | 16 ++++++----- .../crawler/class_CrawlerStateFactory.php | 19 ++++++++----- .../cruncher/class_CruncherStateFactory.php | 19 ++++++++----- .../states/dht/class_DhtStateFactory.php | 19 ++++++++----- .../states/miner/class_MinerStateFactory.php | 19 ++++++++----- .../states/node/class_NodeStateFactory.php | 20 ++++++++------ .../states/peer/class_PeerStateFactory.php | 11 ++++---- .../tags/class_PackageTagsFactory.php | 7 ++--- ...class_NodeActivationAnnouncementFilter.php | 2 +- .../class_AptProxyInitializationFilter.php | 2 +- .../chat/class_ChatInitializationFilter.php | 2 +- .../class_CrawlerInitializationFilter.php | 2 +- .../class_CruncherInitializationFilter.php | 2 +- .../miner/class_MinerInitializationFilter.php | 2 +- ...s_AptProxyTaskHandlerInitializerFilter.php | 2 +- ...class_ChatTaskHandlerInitializerFilter.php | 2 +- ...ss_CrawlerTaskHandlerInitializerFilter.php | 2 +- ...s_CruncherTaskHandlerInitializerFilter.php | 2 +- ...lass_MinerTaskHandlerInitializerFilter.php | 2 +- ...class_NodeTaskHandlerInitializerFilter.php | 2 +- .../handler/chunks/class_ChunkHandler.php | 2 +- .../handler/data/class_BaseDataHandler.php | 2 +- .../package/class_NetworkPackageHandler.php | 2 +- .../raw_data/class_BaseRawDataHandler.php | 2 +- .../connection/class_BaseConnectionHelper.php | 2 +- .../class_CryptoRandomUnitMessageHelper.php | 2 +- .../classes/listener/class_BaseListener.php | 2 +- .../socket/class_SocketFileListener.php | 2 +- .../listener/tcp/class_TcpListener.php | 2 +- .../listener/udp/class_UdpListener.php | 2 +- .../lists/pool/class_PoolEntriesList.php | 2 +- .../miner/chash/class_HubCoinMiner.php | 2 +- .../hub/classes/miner/class_BaseHubMiner.php | 2 +- .../classes/nodes/boot/class_HubBootNode.php | 2 +- .../hub/classes/nodes/class_BaseHubNode.php | 2 +- .../classes/nodes/list/class_HubListNode.php | 2 +- .../nodes/master/class_HubMasterNode.php | 2 +- .../nodes/regular/class_HubRegularNode.php | 2 +- .../assembler/class_PackageAssembler.php | 2 +- .../fragmenter/class_PackageFragmenter.php | 2 +- .../hub/classes/pools/class_BasePool.php | 2 +- .../classes/producer/class_BaseProducer.php | 2 +- .../cruncher/class_CruncherKeyProducer.php | 2 +- .../class_CruncherTestUnitProducer.php | 2 +- .../class_MinerRealGenesisBlockProducer.php | 2 +- .../class_MinerTestGenesisBlockProducer.php | 2 +- .../recipient/dht/class_DhtRecipient.php | 2 +- .../registry/socket/class_SocketRegistry.php | 2 +- .../tcp/class_TcpProtocolResolver.php | 2 +- .../state/class_BaseStateResolver.php | 2 +- .../classes/source/class_BaseUrlSource.php | 2 +- .../source/units/class_TestUnitSource.php | 2 +- .../class_CrawlerUploadedListUrlSource.php | 2 +- .../hub/classes/tools/hub/class_HubTools.php | 2 +- application/hub/config.php | 2 +- ...lass_FactoryRequiredParameterException.php | 2 +- core | 2 +- index.php | 2 +- 102 files changed, 295 insertions(+), 209 deletions(-) diff --git a/application/hub/class_ApplicationHelper.php b/application/hub/class_ApplicationHelper.php index f23d7ea1a..4e7938a79 100644 --- a/application/hub/class_ApplicationHelper.php +++ b/application/hub/class_ApplicationHelper.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Tools\HubTools; // Import framework stuff use Org\Mxchange\CoreFramework\Application\BaseApplication; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Loader\ClassLoader; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Registry\Registerable; diff --git a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php index 75141fdd2..211cb43cb 100644 --- a/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php index c5a549a5d..3c0affdd1 100644 --- a/application/hub/classes/commands/console/class_HubConsoleChatCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleChatCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php index 3b2563e58..9295407f9 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php index 43f648857..34a52c3fe 100644 --- a/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php index 526c45c2b..bca4ecfd2 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMainCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMainCommand.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory; // Import framework stuff use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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; diff --git a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php index 1655d076f..4d9761b28 100644 --- a/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php +++ b/application/hub/classes/commands/console/class_HubConsoleMinerCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php b/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php index d9ac5a7ee..f710c1927 100644 --- a/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php +++ b/application/hub/classes/commands/html/class_HubHtmlIndexCommand.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Command; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/container/socket/class_SocketContainer.php b/application/hub/classes/container/socket/class_SocketContainer.php index b056f92e8..efabd8a0e 100644 --- a/application/hub/classes/container/socket/class_SocketContainer.php +++ b/application/hub/classes/container/socket/class_SocketContainer.php @@ -16,7 +16,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Helper; use Org\Mxchange\CoreFramework\Registry\Registerable; diff --git a/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php b/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php index a82694e28..8e21d9090 100644 --- a/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php +++ b/application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php @@ -5,7 +5,7 @@ namespace Org\Shipsimu\Hub\Controller; // Import framework stuff use Org\Mxchange\CoreFramework\Controller\BaseController; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver; diff --git a/application/hub/classes/cruncher/class_BaseHubCruncher.php b/application/hub/classes/cruncher/class_BaseHubCruncher.php index 573366ef8..4c548d3b9 100644 --- a/application/hub/classes/cruncher/class_BaseHubCruncher.php +++ b/application/hub/classes/cruncher/class_BaseHubCruncher.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Updateable; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** diff --git a/application/hub/classes/cruncher/openssl/class_HubOpenSslCruncher.php b/application/hub/classes/cruncher/openssl/class_HubOpenSslCruncher.php index 748dd54c6..2e08dca0f 100644 --- a/application/hub/classes/cruncher/openssl/class_HubOpenSslCruncher.php +++ b/application/hub/classes/cruncher/openssl/class_HubOpenSslCruncher.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Helper\Cruncher\CruncherHelper; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseFrontend.php b/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseFrontend.php index 1a4b3ff70..0f52971a9 100644 --- a/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseFrontend.php +++ b/application/hub/classes/database/frontend/cruncher/class_CruncherUnitDatabaseFrontend.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Database\Frontend\Unit\UnitDatabaseFrontend; use Org\Shipsimu\Hub\Producer\Cruncher\Unit\BaseUnitProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/database/frontend/node_dht/class_NodeDistributedHashTableDatabaseFrontend.php b/application/hub/classes/database/frontend/node_dht/class_NodeDistributedHashTableDatabaseFrontend.php index db468c2b1..02da97f9b 100644 --- a/application/hub/classes/database/frontend/node_dht/class_NodeDistributedHashTableDatabaseFrontend.php +++ b/application/hub/classes/database/frontend/node_dht/class_NodeDistributedHashTableDatabaseFrontend.php @@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; diff --git a/application/hub/classes/database/frontend/node_information/class_NodeInformationDatabaseFrontend.php b/application/hub/classes/database/frontend/node_information/class_NodeInformationDatabaseFrontend.php index ba9e0e37a..0f0ae5ade 100644 --- a/application/hub/classes/database/frontend/node_information/class_NodeInformationDatabaseFrontend.php +++ b/application/hub/classes/database/frontend/node_information/class_NodeInformationDatabaseFrontend.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Node\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseFrontend.php b/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseFrontend.php index bf6f21d94..70b61aa76 100644 --- a/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseFrontend.php +++ b/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseFrontend.php @@ -15,7 +15,7 @@ use Org\Shipsimu\Hub\Tools\HubTools; // Import framework stuff use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; // Import SPL stuff use \UnexpectedValueException; diff --git a/application/hub/classes/dht/class_BaseDht.php b/application/hub/classes/dht/class_BaseDht.php index 33add16b5..b65ede47a 100644 --- a/application/hub/classes/dht/class_BaseDht.php +++ b/application/hub/classes/dht/class_BaseDht.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Helper\Dht\HelpableDht; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; diff --git a/application/hub/classes/dht/node/class_NodeDhtFacade.php b/application/hub/classes/dht/node/class_NodeDhtFacade.php index 5c037763f..f12fa797b 100644 --- a/application/hub/classes/dht/node/class_NodeDhtFacade.php +++ b/application/hub/classes/dht/node/class_NodeDhtFacade.php @@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; diff --git a/application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php b/application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php index ca6404954..15ae67030 100644 --- a/application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php +++ b/application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php @@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Tools\HubTools; // Import framework stuff use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkException; use Org\Mxchange\CoreFramework\Registry\Registerable; diff --git a/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php b/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php index c800c089c..1bd1511fb 100644 --- a/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php +++ b/application/hub/classes/factories/chain/class_PackageFilterChainFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\FilterChain\Package; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PackageFilterChainFactory extends ObjectFactory { +class PackageFilterChainFactory extends BaseFactory { /** * Protected constructor * @@ -55,7 +56,7 @@ class PackageFilterChainFactory extends ObjectFactory { $chainInstance = GenericRegistry::getRegistry()->getInstance($registryKey); } else { // Initialize a filter chain class - $chainInstance = self::createObjectByConfiguredName('package_filter_chain_class'); + $chainInstance = Object::createObjectByConfiguredName('package_filter_chain_class'); // "Walk" through all tags entries foreach ($tags as $tag) { @@ -65,7 +66,7 @@ class PackageFilterChainFactory extends ObjectFactory { * simply means the tag is not valid. This however should be * handled some calls before this method is called. */ - $filterInstance = self::createObjectByConfiguredName(sprintf('package_tag_%s_filter_class', $tag)); + $filterInstance = ObjectFactory::createObjectByConfiguredName(sprintf('package_tag_%s_filter_class', $tag)); // Add this filter to the chain $chainInstance->addFilter($filterInstance); diff --git a/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php b/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php index 5dd65b562..c5cffc050 100644 --- a/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php +++ b/application/hub/classes/factories/chunks/class_ChunkHandlerFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Chunk; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ChunkHandlerFactory extends ObjectFactory { +class ChunkHandlerFactory extends BaseFactory { /** * Protected constructor * @@ -51,7 +52,7 @@ class ChunkHandlerFactory extends ObjectFactory { $handlerInstance = GenericRegistry::getRegistry()->getInstance('chunk_handler'); } else { // Get the handler instance - $handlerInstance = self::createObjectByConfiguredName('chunk_handler_class'); + $handlerInstance = ObjectFactory::createObjectByConfiguredName('chunk_handler_class'); // Add it to the registry GenericRegistry::getRegistry()->addInstance('chunk_handler', $handlerInstance); diff --git a/application/hub/classes/factories/class_ b/application/hub/classes/factories/class_ index b784b9fa5..c36b6198f 100644 --- a/application/hub/classes/factories/class_ +++ b/application/hub/classes/factories/class_ @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Factory\; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** diff --git a/application/hub/classes/factories/client/class_ClientFactory.php b/application/hub/classes/factories/client/class_ClientFactory.php index ac8f1d957..d98fc0643 100644 --- a/application/hub/classes/factories/client/class_ClientFactory.php +++ b/application/hub/classes/factories/client/class_ClientFactory.php @@ -7,7 +7,8 @@ use Org\Shipsimu\Hub\Container\Socket\StorableSocket; use Org\Shipsimu\Hub\Handler\Protocol\HandleableProtocol; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -32,7 +33,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ClientFactory extends ObjectFactory { +class ClientFactory extends BaseFactory { /** * Protected constructor * @@ -72,7 +73,7 @@ class ClientFactory extends ObjectFactory { } } else { // Generate object instance - $clientInstance = self::createObjectByConfiguredName($registryKey, array($socketInstance)); + $clientInstance = ObjectFactory::createObjectByConfiguredName($registryKey, array($socketInstance)); // Set it in registry for later re-use GenericRegistry::getRegistry()->addInstance($registryKey, $clientInstance); diff --git a/application/hub/classes/factories/communicator/class_CommunicatorFactory.php b/application/hub/classes/factories/communicator/class_CommunicatorFactory.php index aaa9512a5..c3fd37488 100644 --- a/application/hub/classes/factories/communicator/class_CommunicatorFactory.php +++ b/application/hub/classes/factories/communicator/class_CommunicatorFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Communicator; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CommunicatorFactory extends ObjectFactory { +class CommunicatorFactory extends BaseFactory { /** * Protected constructor * @@ -55,7 +56,7 @@ class CommunicatorFactory extends ObjectFactory { $communicatorInstance = GenericRegistry::getRegistry()->getInstance($communicatorType . '_communicator'); } else { // Get the communicator instance - $communicatorInstance = self::createObjectByConfiguredName($configEntry); + $communicatorInstance = ObjectFactory::createObjectByConfiguredName($configEntry); // Add it to the registry GenericRegistry::getRegistry()->addInstance($communicatorType . '_communicator', $communicatorInstance); diff --git a/application/hub/classes/factories/decoder/class_DecoderFactory.php b/application/hub/classes/factories/decoder/class_DecoderFactory.php index 934e909e6..3c79d9e04 100644 --- a/application/hub/classes/factories/decoder/class_DecoderFactory.php +++ b/application/hub/classes/factories/decoder/class_DecoderFactory.php @@ -7,7 +7,8 @@ use Org\Shipsimu\Hub\Factory\Handler\Chunk\ChunkHandlerFactory; use Org\Shipsimu\Hub\Handler\Network\RawData\Chunks\ChunkHandler; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -32,7 +33,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DecoderFactory extends ObjectFactory { +class DecoderFactory extends BaseFactory { /** * Protected constructor * @@ -58,7 +59,7 @@ class DecoderFactory extends ObjectFactory { $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance(); // Get the handler instance - $decoderInstance = self::createObjectByConfiguredName('package_decoder_class', array($handlerInstance)); + $decoderInstance = ObjectFactory::createObjectByConfiguredName('package_decoder_class', array($handlerInstance)); // Add it to the registry GenericRegistry::getRegistry()->addInstance('package_decoder', $decoderInstance); diff --git a/application/hub/classes/factories/dht/class_DhtObjectFactory.php b/application/hub/classes/factories/dht/class_DhtObjectFactory.php index 92b46037d..e1400ee12 100644 --- a/application/hub/classes/factories/dht/class_DhtObjectFactory.php +++ b/application/hub/classes/factories/dht/class_DhtObjectFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Dht; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DhtObjectFactory extends ObjectFactory { +class DhtObjectFactory extends BaseFactory { /** * Protected constructor * @@ -55,7 +56,7 @@ class DhtObjectFactory extends ObjectFactory { $dhtInstance = GenericRegistry::getRegistry()->getInstance($name); } else { // Get the handler instance - $dhtInstance = self::createObjectByConfiguredName($name . '_class'); + $dhtInstance = ObjectFactory::createObjectByConfiguredName($name . '_class'); // Add it to the registry GenericRegistry::getRegistry()->addInstance($name, $dhtInstance); diff --git a/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php b/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php index 3ff125e59..4523b6f0a 100644 --- a/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php +++ b/application/hub/classes/factories/discovery/class_PackageDiscoveryFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Discovery\Package; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PackageDiscoveryFactory extends ObjectFactory { +class PackageDiscoveryFactory extends BaseFactory { /** * Protected constructor * @@ -53,7 +54,7 @@ class PackageDiscoveryFactory extends ObjectFactory { $discoveryInstance = GenericRegistry::getRegistry()->getInstance('package_discovery'); } else { // Create a new instance - $discoveryInstance = self::createObjectByConfiguredName('package_recipient_discovery_class'); + $discoveryInstance = ObjectFactory::createObjectByConfiguredName('package_recipient_discovery_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('package_discovery', $discoveryInstance); diff --git a/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php b/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php index 6c7d59b7a..71f378549 100644 --- a/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php +++ b/application/hub/classes/factories/discovery/class_SocketDiscoveryFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Discovery\Socket; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class SocketDiscoveryFactory extends ObjectFactory { +class SocketDiscoveryFactory extends BaseFactory { /** * Protected constructor * @@ -53,7 +54,7 @@ class SocketDiscoveryFactory extends ObjectFactory { $discoveryInstance = GenericRegistry::getRegistry()->getInstance('socket_discovery'); } else { // Create a new instance - $discoveryInstance = self::createObjectByConfiguredName('socket_discovery_class'); + $discoveryInstance = ObjectFactory::createObjectByConfiguredName('socket_discovery_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('socket_discovery', $discoveryInstance); diff --git a/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php b/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php index 5a8c4464e..3303fb2ac 100644 --- a/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_MessageTypeHandlerFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Message; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for message type handlers * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class MessageTypeHandlerFactory extends ObjectFactory { +class MessageTypeHandlerFactory extends BaseFactory { /** * Protected constructor * @@ -47,17 +51,26 @@ class MessageTypeHandlerFactory extends ObjectFactory { * @param $messageType Message type to create an object from * @return $handlerInstance A message type handler instance */ - public static final function createMessageTypeHandlerInstance ($messageType) { + public static final function createMessageTypeHandlerInstance (string $messageType) { + // Validate parameter + if (empty($messageType)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "messageType" is empty'); + } + + // Init registry key + $registryKey = 'message_type_' . $messageType . '_handler'; + // Do we have an instance in the registry? - if (GenericRegistry::getRegistry()->instanceExists('message_type_' . $messageType . '_handler')) { + if (GenericRegistry::getRegistry()->instanceExists($registryKey)) { // Then use this instance - $handlerInstance = GenericRegistry::getRegistry()->getInstance('message_type_' . $messageType . '_handler'); + $handlerInstance = GenericRegistry::getRegistry()->getInstance($registryKey); } else { // Now prepare the tags instance - $handlerInstance = self::createObjectByConfiguredName('message_type_' . $messageType . '_handler_class'); + $handlerInstance = ObjectFactory::createObjectByConfiguredName('message_type_' . $messageType . '_handler_class'); // Set the instance in registry for further use - GenericRegistry::getRegistry()->addInstance('message_type_' . $messageType . '_handler', $handlerInstance); + GenericRegistry::getRegistry()->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 ca6e50f9b..8395ee5ac 100644 --- a/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_NetworkPackageHandlerFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Handler\Network; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class NetworkPackageHandlerFactory extends ObjectFactory { +class NetworkPackageHandlerFactory extends BaseFactory { /** * Protected constructor * @@ -57,16 +58,16 @@ class NetworkPackageHandlerFactory extends ObjectFactory { * keep it open here so you can experiment with the settings and don't * need to touch this code. */ - $compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class'); + $compressorInstance = ObjectFactory::createObjectByConfiguredName('raw_package_compressor_class'); // Prepare the decorator compressor (for later flawless and easy updates) - $compressorInstance = self::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance)); + $compressorInstance = ObjectFactory::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance)); /* * Now prepare the network package for delivery so only need to do this * once just before the "big announcement loop". */ - $handlerInstance = self::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance)); + $handlerInstance = ObjectFactory::createObjectByConfiguredName('network_package_handler_class', array($compressorInstance)); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('network_package_handler', $handlerInstance); diff --git a/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php b/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php index ee4ded6dd..a1fa7260f 100644 --- a/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php +++ b/application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php @@ -8,12 +8,10 @@ use Org\Shipsimu\Hub\Helper\HubHelper; use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; -// Import SPL stuff -use \InvalidArgumentException; - /** * A factory class for protocol handlers * @@ -37,7 +35,7 @@ use \InvalidArgumentException; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ProtocolHandlerFactory extends ObjectFactory { +class ProtocolHandlerFactory extends BaseFactory { /** * Protected constructor * @@ -62,7 +60,7 @@ class ProtocolHandlerFactory extends ObjectFactory { $handlerInstance = GenericRegistry::getRegistry()->getInstance($protocolType . '_protocol_handler'); } else { // Now prepare the tags instance - $handlerInstance = self::createObjectByConfiguredName($protocolType . '_protocol_handler_class'); + $handlerInstance = ObjectFactory::createObjectByConfiguredName($protocolType . '_protocol_handler_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance($protocolType . '_protocol_handler', $handlerInstance); @@ -85,7 +83,7 @@ class ProtocolHandlerFactory extends ObjectFactory { $protocolType = $helperInstance->determineProtocolType(); // Call super factory method - return self::createProtocolHandlerByType($protocolType); + return ObjectFactory::createProtocolHandlerByType($protocolType); } /** @@ -99,7 +97,7 @@ class ProtocolHandlerFactory extends ObjectFactory { $protocolType = ProtocolDiscovery::discoverProtocolByPackageInstance($packageInstance); // Call super factory method - return self::createProtocolHandlerByType($protocolType); + return ObjectFactory::createProtocolHandlerByType($protocolType); } } diff --git a/application/hub/classes/factories/info/class_ConnectionInfoFactory.php b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php index 614464c3c..156be16f3 100644 --- a/application/hub/classes/factories/info/class_ConnectionInfoFactory.php +++ b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Factory\Information\Connection; use Org\Shipsimu\Hub\Container\Socket\StorableSocket; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; // Import SPL stuff @@ -34,7 +34,7 @@ use \InvalidArgumentException; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ConnectionInfoFactory extends ObjectFactory { +class ConnectionInfoFactory extends BaseFactory { /** * Array with all valid types */ diff --git a/application/hub/classes/factories/lists/class_RecipientListFactory.php b/application/hub/classes/factories/lists/class_RecipientListFactory.php index 6b09f5f2d..1cebb9d86 100644 --- a/application/hub/classes/factories/lists/class_RecipientListFactory.php +++ b/application/hub/classes/factories/lists/class_RecipientListFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Lists\Recipient; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class RecipientListFactory extends ObjectFactory { +class RecipientListFactory extends BaseFactory { /** * Protected constructor * @@ -53,7 +54,7 @@ class RecipientListFactory extends ObjectFactory { $listInstance = GenericRegistry::getRegistry()->getInstance('recipient_list'); } else { // Create a new instance - $listInstance = self::createObjectByConfiguredName('recipient_list_class'); + $listInstance = ObjectFactory::createObjectByConfiguredName('recipient_list_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('recipient_list', $listInstance); diff --git a/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php b/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php index bb0236367..de59b16fd 100644 --- a/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php +++ b/application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Factory\Network\Locator; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for LocateableNode * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UniversalNodeLocatorFactory extends ObjectFactory { +class UniversalNodeLocatorFactory extends BaseFactory { /** * Protected constructor * @@ -42,12 +46,16 @@ class UniversalNodeLocatorFactory extends ObjectFactory { /** * Returns a singleton (registry-based) LocateableNode instance * - * @param $unl UNL address + * @param $unl UNL address * @return $locatorInstance An instance of a LocateableNode class */ - public static final function createUnlInstanceFromString ($unl) { - // Trace message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl)); + public static final function createUnlInstanceFromString (string $unl) { + // Validate parameter + //* NOISY-DEBUG: */ ObjectFactory::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl)); + if (empty($unl)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "unl" is empty'); + } // If there is no handler? if (GenericRegistry::getRegistry()->instanceExists('unl_' . $unl)) { @@ -55,7 +63,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory { $locatorInstance = GenericRegistry::getRegistry()->getInstance('unl_' . $unl); } else { // Get the handler instance - $locatorInstance = self::createObjectByConfiguredName('universal_node_locator_class'); + $locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class'); // Parse UNL string $locatorInstance->parseStringAsUnl($unl); @@ -65,7 +73,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory { } // Trace message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: locatorInstance[]=%s - EXIT!', gettype($locatorInstance))); + //* NOISY-DEBUG: */ ObjectFactory::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: locatorInstance[]=%s - EXIT!', gettype($locatorInstance))); // Return the instance return $locatorInstance; @@ -79,7 +87,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory { */ public static final function createUnlInstanceFromArray (array $unlData) { // No "caching" for now - $locatorInstance = self::createObjectByConfiguredName('universal_node_locator_class', array($unlData)); + $locatorInstance = ObjectFactory::createObjectByConfiguredName('universal_node_locator_class', array($unlData)); // Return it return $locatorInstance; diff --git a/application/hub/classes/factories/node/class_NodeObjectFactory.php b/application/hub/classes/factories/node/class_NodeObjectFactory.php index f580b2a41..8beb2a05b 100644 --- a/application/hub/classes/factories/node/class_NodeObjectFactory.php +++ b/application/hub/classes/factories/node/class_NodeObjectFactory.php @@ -4,7 +4,8 @@ namespace Org\Shipsimu\Hub\Factory\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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\Request\Requestable; @@ -33,7 +34,7 @@ use Org\Mxchange\CoreFramework\Utils\String\StringUtils; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class NodeObjectFactory extends ObjectFactory { +class NodeObjectFactory extends BaseFactory { /** * Protected constructor * diff --git a/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php b/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php index 6d6848c49..c68fec1e3 100644 --- a/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php +++ b/application/hub/classes/factories/package/assembler/class_PackageAssemblerFactory.php @@ -6,7 +6,8 @@ namespace Org\Shipsimu\Hub\Factory\Assembler\Package; use Org\Shipsimu\Hub\Network\Receive\Receivable; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -31,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PackageAssemblerFactory extends ObjectFactory { +class PackageAssemblerFactory extends BaseFactory { /** * Protected constructor * @@ -57,7 +58,7 @@ class PackageAssemblerFactory extends ObjectFactory { $assemblerInstance = GenericRegistry::getRegistry()->getInstance('package_assembler'); } else { // Get the assembler instance - $assemblerInstance = self::createObjectByConfiguredName('package_assembler_class', array($handlerInstance)); + $assemblerInstance = ObjectFactory::createObjectByConfiguredName('package_assembler_class', array($handlerInstance)); // Add it to the registry GenericRegistry::getRegistry()->addInstance('package_assembler', $assemblerInstance); diff --git a/application/hub/classes/factories/package/class_NetworkPackageFactory.php b/application/hub/classes/factories/package/class_NetworkPackageFactory.php index c5d8af6a5..b83d7bf8f 100644 --- a/application/hub/classes/factories/package/class_NetworkPackageFactory.php +++ b/application/hub/classes/factories/package/class_NetworkPackageFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Network; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class NetworkPackageFactory extends ObjectFactory { +class NetworkPackageFactory extends BaseFactory { /** * Protected constructor * @@ -57,16 +58,16 @@ class NetworkPackageFactory extends ObjectFactory { * keep it open here so you can experiment with the settings and don't * need to touch this code. */ - $compressorInstance = self::createObjectByConfiguredName('raw_package_compressor_class'); + $compressorInstance = ObjectFactory::createObjectByConfiguredName('raw_package_compressor_class'); // Prepare the decorator compressor (for later flawless and easy updates) - $compressorInstance = self::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance)); + $compressorInstance = ObjectFactory::createObjectByConfiguredName('deco_package_compressor_class', array($compressorInstance)); /* * Now prepare the network package for delivery so only need to do this * once just before the "big announcement loop". */ - $packageInstance = self::createObjectByConfiguredName('network_package_class', array($compressorInstance)); + $packageInstance = ObjectFactory::createObjectByConfiguredName('network_package_class', array($compressorInstance)); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('network_package', $packageInstance); diff --git a/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php b/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php index 9e759a349..50b252b2b 100644 --- a/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php +++ b/application/hub/classes/factories/package/fragmenter/class_FragmenterFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Fragmenter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class FragmenterFactory extends ObjectFactory { +class FragmenterFactory extends BaseFactory { /** * Protected constructor * @@ -54,7 +55,7 @@ class FragmenterFactory extends ObjectFactory { $fragmenterInstance = GenericRegistry::getRegistry()->getInstance($fragmenterType . '_fragmenter'); } else { // Get the fragmenter instance - $fragmenterInstance = self::createObjectByConfiguredName($fragmenterType . '_fragmenter_class'); + $fragmenterInstance = ObjectFactory::createObjectByConfiguredName($fragmenterType . '_fragmenter_class'); // Add it to the registry GenericRegistry::getRegistry()->addInstance($fragmenterType . '_fragmenter', $fragmenterInstance); diff --git a/application/hub/classes/factories/producer/class_ProducerFactory.php b/application/hub/classes/factories/producer/class_ProducerFactory.php index 37eff898a..37037b75f 100644 --- a/application/hub/classes/factories/producer/class_ProducerFactory.php +++ b/application/hub/classes/factories/producer/class_ProducerFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Producer; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ProducerFactory extends ObjectFactory { +class ProducerFactory extends BaseFactory { /** * Protected constructor * @@ -55,7 +56,7 @@ class ProducerFactory extends ObjectFactory { $producerInstance = GenericRegistry::getRegistry()->getInstance($producerType . '_producer'); } else { // Get the producer instance - $producerInstance = self::createObjectByConfiguredName($configEntry); + $producerInstance = ObjectFactory::createObjectByConfiguredName($configEntry); // Add it to the registry GenericRegistry::getRegistry()->addInstance($producerType . '_producer', $producerInstance); diff --git a/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php b/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php index 2b1c77e72..e8146441d 100644 --- a/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php +++ b/application/hub/classes/factories/registry/class_ObjectTypeRegistryFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Registry\Object; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ObjectTypeRegistryFactory extends ObjectFactory { +class ObjectTypeRegistryFactory extends BaseFactory { /** * Protected constructor * @@ -51,7 +52,7 @@ class ObjectTypeRegistryFactory extends ObjectFactory { $registryInstance = GenericRegistry::getRegistry()->getInstance('object_type_registry'); } else { // Now prepare the tags instance - $registryInstance = self::createObjectByConfiguredName('node_object_type_registry_class'); + $registryInstance = ObjectFactory::createObjectByConfiguredName('node_object_type_registry_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('object_type_registry', $registryInstance); diff --git a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php index 81a84ee7b..1cfe1043a 100644 --- a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php +++ b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php @@ -4,7 +4,8 @@ namespace Org\Shipsimu\Hub\Factory\Resolver\Protocol; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -29,7 +30,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ProtocolResolverFactory extends ObjectFactory { +class ProtocolResolverFactory extends BaseFactory { /** * Protected constructor * @@ -55,7 +56,7 @@ class ProtocolResolverFactory extends ObjectFactory { $resolverInstance = GenericRegistry::getRegistry()->getInstance($protocolName . '_protocol_resolver'); } else { // Get the handler instance - $resolverInstance = self::createObjectByConfiguredName($protocolName . '_protocol_resolver_class'); + $resolverInstance = ObjectFactory::createObjectByConfiguredName($protocolName . '_protocol_resolver_class'); // Add it to the registry GenericRegistry::getRegistry()->addInstance($protocolName . '_protocol_resolver', $resolverInstance); diff --git a/application/hub/classes/factories/socket/class_SocketFactory.php b/application/hub/classes/factories/socket/class_SocketFactory.php index b095b55ec..7bac10c43 100644 --- a/application/hub/classes/factories/socket/class_SocketFactory.php +++ b/application/hub/classes/factories/socket/class_SocketFactory.php @@ -13,7 +13,8 @@ use Org\Shipsimu\Hub\Pool\Poolable; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; @@ -46,7 +47,7 @@ use \UnexpectedValueException; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class SocketFactory extends ObjectFactory { +class SocketFactory extends BaseFactory { /** * Protected constructor * @@ -232,7 +233,7 @@ class SocketFactory extends ObjectFactory { // Set the option to reuse the port //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Enabling re-use address ...'); - if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tcp_socket_enable_reuse_address') && !$socketInstance->enableSocketReuseAddress()) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tcp_socket_enable_reuse_address') == 'Y' && !$socketInstance->enableSocketReuseAddress()) { // Handle this socket error $socketInstance->handleSocketError(__METHOD__, __LINE__); } @@ -269,12 +270,12 @@ class SocketFactory extends ObjectFactory { $packageInstance = ObjectFactory::createObjectByConfiguredName('package_data_class'); // Create socket instance - $socketInstance = self::createObjectByConfiguredName('socket_container_class', array( + $socketInstance = self::createObjectByConfiguredName('socket_container_class', [ $socketResource, StorableSocket::SOCKET_PROTOCOL_TCP, $packageInstance, StorableSocket::CONNECTION_TYPE_SERVER, - )); + ]); // Set listener instance $socketInstance->setListenerInstance($listenerInstance); diff --git a/application/hub/classes/factories/source/units/class_UnitSourceFactory.php b/application/hub/classes/factories/source/units/class_UnitSourceFactory.php index 51476c21b..d8cead479 100644 --- a/application/hub/classes/factories/source/units/class_UnitSourceFactory.php +++ b/application/hub/classes/factories/source/units/class_UnitSourceFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Factory\Crawler\Source\Unit; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for unit sources * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UnitSourceFactory extends ObjectFactory { +class UnitSourceFactory extends BaseFactory { /** * Protected constructor * @@ -45,14 +49,20 @@ class UnitSourceFactory extends ObjectFactory { * @param $unitType Type of the unit source * @return $sourceInstance A UnitSource class instance */ - public static final function createUnitSourceInstance ($unitType) { + public static final function createUnitSourceInstance (string $unitType) { + // Validate parameter + if (empty($unitType)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "unitType" is empty'); + } + // Do we have cache? if (!GenericRegistry::getRegistry()->instanceExists($unitType . '_unit_source')) { // Then construct the class' configuraton entry $className = '' . $unitType . '_unit_source_class'; // Get a class from that configuration entry - $sourceInstance = self::createObjectByConfiguredName($className); + $sourceInstance = ObjectFactory::createObjectByConfiguredName($className); // Add it to the registry GenericRegistry::getRegistry()->addInstance($unitType . '_unit_source', $sourceInstance); diff --git a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php index 17fa7aba7..035c7b092 100644 --- a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php +++ b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Crawler\Source\Url; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Task\Taskable; @@ -29,7 +30,7 @@ use Org\Mxchange\CoreFramework\Task\Taskable; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UrlSourceObjectFactory extends ObjectFactory { +class UrlSourceObjectFactory extends BaseFactory { /** * Protected constructor * @@ -65,7 +66,7 @@ class UrlSourceObjectFactory extends ObjectFactory { $sourceInstance = GenericRegistry::getRegistry()->getInstance('source_' . $sourceType); } else { // Get the source instance - $sourceInstance = self::createObjectByConfiguredName($sourceType . '_class'); + $sourceInstance = ObjectFactory::createObjectByConfiguredName($sourceType . '_class'); // Add it to the registry GenericRegistry::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 2699dd203..7c4aad3ce 100644 --- a/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php +++ b/application/hub/classes/factories/states/communicator/class_CommunicatorStateFactory.php @@ -6,7 +6,8 @@ namespace Org\Shipsimu\Hub\Factory\State\Communicator; use Org\ShipSimu\Hub\Communicator\Communicator; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; /** * A factory class for communicator states @@ -30,7 +31,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CommunicatorStateFactory extends ObjectFactory { +class CommunicatorStateFactory extends BaseFactory { /** * Protected constructor * @@ -49,12 +50,15 @@ class CommunicatorStateFactory extends ObjectFactory { * @param $communicatorInstance An instance of a Communicator class * @return $stateInstance An instance of a Stateable class */ - public static final function createCommunicatorStateInstanceByName ($stateName, Communicator $communicatorInstance) { - // Then construct the class' configuraton entry - $className = 'communicator_' . $stateName . '_state_class'; + public static final function createCommunicatorStateInstanceByName (string $stateName, Communicator $communicatorInstance) { + // Validate parameter + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className, array($communicatorInstance)); + $stateInstance = ObjectFactory::createObjectByConfiguredName('communicator_' . $stateName . '_state_class', array($communicatorInstance)); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMMUNICATOR-STATE-FACTORY: Communicator state has changed from ' . $communicatorInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php b/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php index 6571d6897..2695e75d3 100644 --- a/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php +++ b/application/hub/classes/factories/states/crawler/class_CrawlerStateFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Crawler\Factory\State; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for crawler states * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CrawlerStateFactory extends ObjectFactory { +class CrawlerStateFactory extends BaseFactory { /** * Protected constructor * @@ -46,12 +50,15 @@ class CrawlerStateFactory extends ObjectFactory { * @param $stateName Name of the state * @return $stateInstance A Stateable class instance */ - public static final function createCrawlerStateInstanceByName ($stateName) { - // Then construct the class' configuraton entry - $className = 'crawler_' . $stateName . '_state_class'; + public static final function createCrawlerStateInstanceByName (string $stateName) { + // Validate parameter + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className); + $stateInstance = ObjectFactory::createObjectByConfiguredName('crawler_' . $stateName . '_state_class'); // Get crawler instance $crawlerInstance = GenericRegistry::getRegistry()->getInstance('crawler'); diff --git a/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php b/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php index 373ae39c4..45bd084d7 100644 --- a/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php +++ b/application/hub/classes/factories/states/cruncher/class_CruncherStateFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Factory\State\Cruncher; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for cruncher states * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CruncherStateFactory extends ObjectFactory { +class CruncherStateFactory extends BaseFactory { /** * Protected constructor * @@ -46,15 +50,18 @@ class CruncherStateFactory extends ObjectFactory { * @param $stateName Name of the state * @return $stateInstance A Stateable class instance */ - public static final function createCruncherStateInstanceByName ($stateName) { - // Then construct the class' configuraton entry - $className = sprintf('cruncher_%s_state_class', $stateName); + public static final function createCruncherStateInstanceByName (string $stateName) { + // Validate parameter + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } // Get cruncher instance from registry $cruncherInstance = GenericRegistry::getRegistry()->getInstance('cruncher'); // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className); + $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('cruncher_%s_state_class', $stateName)); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRUNCHER-STATE-FACTORY: Cruncher state has changed from ' . $cruncherInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/dht/class_DhtStateFactory.php b/application/hub/classes/factories/states/dht/class_DhtStateFactory.php index acf819993..e100869af 100644 --- a/application/hub/classes/factories/states/dht/class_DhtStateFactory.php +++ b/application/hub/classes/factories/states/dht/class_DhtStateFactory.php @@ -7,7 +7,11 @@ use Org\Shipsimu\Hub\Dht\Distributable; use Org\Shipsimu\Hub\Factory\State\Dht\DhtStateFactory; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; + +// Import SPL stuff +use \InvalidArgumentException; /** * A factory class for DHT states @@ -31,7 +35,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DhtStateFactory extends ObjectFactory { +class DhtStateFactory extends BaseFactory { /** * Protected constructor * @@ -50,12 +54,15 @@ class DhtStateFactory extends ObjectFactory { * @param $dhtInstance A Distributable class instance * @return $stateInstance A Stateable class instance */ - public static final function createDhtStateInstanceByName ($stateName, Distributable $dhtInstance) { - // Then construct the class' configuraton entry - $className = 'dht_' . $stateName . '_state_class'; + public static final function createDhtStateInstanceByName (string $stateName, Distributable $dhtInstance) { + // Validate parameter + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className, array($dhtInstance)); + $stateInstance = self::createObjectByConfiguredName('dht_' . $stateName . '_state_class', array($dhtInstance)); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-STATE-FACTORY: DHT state has changed from ' . $dhtInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/miner/class_MinerStateFactory.php b/application/hub/classes/factories/states/miner/class_MinerStateFactory.php index 3f4efa2b5..ac2fc2dde 100644 --- a/application/hub/classes/factories/states/miner/class_MinerStateFactory.php +++ b/application/hub/classes/factories/states/miner/class_MinerStateFactory.php @@ -3,9 +3,13 @@ namespace Org\Shipsimu\Hub\Factory\State\Miner; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; +// Import SPL stuff +use \InvalidArgumentException; + /** * A factory class for miner states * @@ -28,7 +32,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class MinerStateFactory extends ObjectFactory { +class MinerStateFactory extends BaseFactory { /** * Protected constructor * @@ -46,15 +50,18 @@ class MinerStateFactory extends ObjectFactory { * @param $stateName Name of the state * @return $stateInstance A Stateable class instance */ - public static final function createMinerStateInstanceByName ($stateName) { - // Then construct the class' configuraton entry - $className = 'miner_' . $stateName . '_state_class'; + public static final function createMinerStateInstanceByName (string $stateName) { + // Validate parameter + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } // Get miner instance $minerInstance = GenericRegistry::getRegistry()->getInstance('miner'); // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className); + $stateInstance = ObjectFactory::createObjectByConfiguredName('miner_' . $stateName . '_state_class'); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MINER-STATE-FACTORY: Miner state has changed from ' . $minerInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/node/class_NodeStateFactory.php b/application/hub/classes/factories/states/node/class_NodeStateFactory.php index 4f7d809b9..5da2faedc 100644 --- a/application/hub/classes/factories/states/node/class_NodeStateFactory.php +++ b/application/hub/classes/factories/states/node/class_NodeStateFactory.php @@ -7,7 +7,11 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory; use Org\Shipsimu\Hub\Node\Node; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; + +// Import SPL stuff +use \InvalidArgumentException; /** * A factory class for node states @@ -31,7 +35,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class NodeStateFactory extends ObjectFactory { +class NodeStateFactory extends BaseFactory { /** * Protected constructor * @@ -50,19 +54,19 @@ class NodeStateFactory extends ObjectFactory { * @param $nodeInstance An instance of a Node class (optional) * @return $stateInstance A Stateable class instance */ - public static final function createNodeStateInstanceByName ($stateName, Node $nodeInstance = NULL) { - // Then construct the class' configuraton entry - $className = 'node_' . $stateName . '_state_class'; - + public static final function createNodeStateInstanceByName (string $stateName, Node $nodeInstance = NULL) { // Is the node instance set? - if (is_null($nodeInstance)) { + if (empty($stateName)) { + // Throw IAE + throw new InvalidArgumentException('Parameter "stateName" is empty'); + } elseif (is_null($nodeInstance)) { // Get node instance from registry /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NOTE-STATE-FACTORY: Creating node instance ...'); $nodeInstance = NodeObjectFactory::createNodeInstance(); } // Get a class from that configuration entry - $stateInstance = self::createObjectByConfiguredName($className, array($nodeInstance)); + $stateInstance = ObjectFactory::createObjectByConfiguredName('node_' . $stateName . '_state_class', array($nodeInstance)); // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE-STATE-FACTORY: Node state has changed from ' . $nodeInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/hub/classes/factories/states/peer/class_PeerStateFactory.php b/application/hub/classes/factories/states/peer/class_PeerStateFactory.php index f48c816aa..8d5ae6ac1 100644 --- a/application/hub/classes/factories/states/peer/class_PeerStateFactory.php +++ b/application/hub/classes/factories/states/peer/class_PeerStateFactory.php @@ -8,7 +8,8 @@ use Org\Shipsimu\Hub\Helper\Connection\ConnectionHelper; use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; // Import SPL stuff @@ -36,7 +37,7 @@ use \InvalidArgumentException; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PeerStateFactory extends ObjectFactory { +class PeerStateFactory extends BaseFactory { /** * Static lookup table instance */ @@ -119,7 +120,7 @@ class PeerStateFactory extends ObjectFactory { * It is a new peer so create the state instance based on error * code and get an instance from it. */ - $stateInstance = self::createObjectByConfiguredName('peer_' . $errorName . '_state_class'); + $stateInstance = ObjectFactory::createObjectByConfiguredName('peer_' . $errorName . '_state_class'); // And register it with the lookup table $tableInstance->registerPeerState($stateInstance, $packageInstance); @@ -136,7 +137,7 @@ class PeerStateFactory extends ObjectFactory { * get an instance of the state. */ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PEER-STATE-FACTORY: Updating peer state ...'); - $stateInstance = self::createObjectByConfiguredName(sprintf('peer_%s_state_class', $errorName)); + $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('peer_%s_state_class', $errorName)); // The peer's state has changed, update database now $tableInstance->registerPeerState($stateInstance, $packageInstance); @@ -168,7 +169,7 @@ class PeerStateFactory extends ObjectFactory { } // Get a class from a configuration entry - $stateInstance = self::createObjectByConfiguredName(sprintf('peer_%s_state_class', $stateName), array($helperInstance)); + $stateInstance = ObjectFactory::createObjectByConfiguredName(sprintf('peer_%s_state_class', $stateName), array($helperInstance)); // Once we have that state, set it in the peer instance /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PEER-STATE-FACTORY: Peer state has changed from %s to %s (%s).', $helperInstance->getPrintableState(), $stateInstance->getStateName(), $stateInstance->__toString())); diff --git a/application/hub/classes/factories/tags/class_PackageTagsFactory.php b/application/hub/classes/factories/tags/class_PackageTagsFactory.php index 723e0d4d7..bec76339e 100644 --- a/application/hub/classes/factories/tags/class_PackageTagsFactory.php +++ b/application/hub/classes/factories/tags/class_PackageTagsFactory.php @@ -3,7 +3,8 @@ namespace Org\Shipsimu\Hub\Factory\Tag\Package; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\BaseFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; /** @@ -28,7 +29,7 @@ use Org\Mxchange\CoreFramework\Registry\GenericRegistry; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class PackageTagsFactory extends ObjectFactory { +class PackageTagsFactory extends BaseFactory { /** * Protected constructor * @@ -53,7 +54,7 @@ class PackageTagsFactory extends ObjectFactory { $packageInstance = GenericRegistry::getRegistry()->getInstance('package_tags'); } else { // Now prepare the tags instance - $packageInstance = self::createObjectByConfiguredName('package_tags_class'); + $packageInstance = ObjectFactory::createObjectByConfiguredName('package_tags_class'); // Set the instance in registry for further use GenericRegistry::getRegistry()->addInstance('package_tags', $packageInstance); diff --git a/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php b/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php index e036a8519..f7c7f40d8 100644 --- a/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php +++ b/application/hub/classes/filter/activation/node/class_NodeActivationAnnouncementFilter.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Filter\Activation\Node\Announcement; use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php index ba9c83698..3ac1e236e 100644 --- a/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php +++ b/application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\AptProxy\Filter\Initialization; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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; diff --git a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php index 518e8f0ec..3610c254a 100644 --- a/application/hub/classes/filter/chat/class_ChatInitializationFilter.php +++ b/application/hub/classes/filter/chat/class_ChatInitializationFilter.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Chat\Filter\Initialization; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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; diff --git a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php index 4d5b8954d..3b4d9c7d5 100644 --- a/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php +++ b/application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Crawler\Filter\Initialization; use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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; diff --git a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php index 561a0aab4..cdbd8014d 100644 --- a/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php +++ b/application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php index 839629ba2..40a9a9e14 100644 --- a/application/hub/classes/filter/miner/class_MinerInitializationFilter.php +++ b/application/hub/classes/filter/miner/class_MinerInitializationFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Miner\Filter\BaseMinerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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; 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 4e94682c0..ed79417da 100644 --- a/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\AptProxy\Handler\Task; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php index 286ee6bdb..dde2617f4 100644 --- a/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\Chat\Handler\Task; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php index 34856646f..e8f31f121 100644 --- a/application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Crawler\Filter\BaseCrawlerFilter; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php index d90285453..60f8d384e 100644 --- a/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\Cruncher\Handler\Task; use Org\Shipsimu\Hub\Cruncher\Filter\BaseCruncherFilter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php index b0e3317e0..de20bd4a0 100644 --- a/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Filter\Initializer\Miner\Handler\Task; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php b/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php index 5eaf30ee5..f2c4a4ff4 100644 --- a/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php +++ b/application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory; use Org\Shipsimu\Hub\Filter\Node\BaseNodeFilter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Request\Requestable; diff --git a/application/hub/classes/handler/chunks/class_ChunkHandler.php b/application/hub/classes/handler/chunks/class_ChunkHandler.php index 0eb123e44..a98d016c9 100644 --- a/application/hub/classes/handler/chunks/class_ChunkHandler.php +++ b/application/hub/classes/handler/chunks/class_ChunkHandler.php @@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Traits\Fragmenter\FragmentableTrait; // Import framework stuff use Org\Mxchange\CoreFramework\Assertion\AssertionException; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Utils\String\StringUtils; use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; diff --git a/application/hub/classes/handler/data/class_BaseDataHandler.php b/application/hub/classes/handler/data/class_BaseDataHandler.php index 4b81fae0b..4b2368c5f 100644 --- a/application/hub/classes/handler/data/class_BaseDataHandler.php +++ b/application/hub/classes/handler/data/class_BaseDataHandler.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Network\Delivery\Deliverable; use Org\Shipsimu\Hub\Network\Message\DeliverableMessage; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkException; /** diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index d2f4efedf..75134b4d3 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -33,7 +33,7 @@ use Org\Shipsimu\Hub\Tools\HubTools; // Import framework stuff use Org\Mxchange\CoreFramework\Compressor\Compressor; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory; use Org\Mxchange\CoreFramework\Feature\FrameworkFeature; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; diff --git a/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php b/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php index 7ed2c6332..d602b76ca 100644 --- a/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php +++ b/application/hub/classes/handler/raw_data/class_BaseRawDataHandler.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Handler\BaseHubHandler; use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; /** * A general Handler for raw data from sockets diff --git a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php index 8bb74a8e6..d134999dd 100644 --- a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php @@ -19,7 +19,7 @@ use Org\Shipsimu\Hub\Traits\Fragmenter\FragmentableTrait; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Traits\Stream\Output\OutputStreamTrait; diff --git a/application/hub/classes/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php b/application/hub/classes/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php index 9d740a134..7d658fa73 100644 --- a/application/hub/classes/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php +++ b/application/hub/classes/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Helper\Message\BaseMessageHelper; use Org\Shipsimu\Hub\Helper\Message\MessageHelper; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; /** * A CryptoRandom message helper diff --git a/application/hub/classes/listener/class_BaseListener.php b/application/hub/classes/listener/class_BaseListener.php index 54180fcee..c7b4b5d19 100644 --- a/application/hub/classes/listener/class_BaseListener.php +++ b/application/hub/classes/listener/class_BaseListener.php @@ -18,7 +18,7 @@ use Org\Shipsimu\Hub\Traits\Container\Socket\StorableSocketTrait; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\Registry\Socket\SocketRegistryFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Socket\InvalidServerSocketException; diff --git a/application/hub/classes/listener/socket/class_SocketFileListener.php b/application/hub/classes/listener/socket/class_SocketFileListener.php index 5bd08c4c9..b71322491 100644 --- a/application/hub/classes/listener/socket/class_SocketFileListener.php +++ b/application/hub/classes/listener/socket/class_SocketFileListener.php @@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; /** * A file-based socket listener diff --git a/application/hub/classes/listener/tcp/class_TcpListener.php b/application/hub/classes/listener/tcp/class_TcpListener.php index 05397d323..4eaa42c1b 100644 --- a/application/hub/classes/listener/tcp/class_TcpListener.php +++ b/application/hub/classes/listener/tcp/class_TcpListener.php @@ -9,7 +9,7 @@ use Org\Shipsimu\Hub\Listener\BaseListener; use Org\Shipsimu\Hub\Listener\Listenable; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; /** * A TCP connection listener diff --git a/application/hub/classes/listener/udp/class_UdpListener.php b/application/hub/classes/listener/udp/class_UdpListener.php index 298ad3446..9c41cac08 100644 --- a/application/hub/classes/listener/udp/class_UdpListener.php +++ b/application/hub/classes/listener/udp/class_UdpListener.php @@ -10,7 +10,7 @@ use Org\Shipsimu\Hub\Listener\Listenable; use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; /** diff --git a/application/hub/classes/lists/pool/class_PoolEntriesList.php b/application/hub/classes/lists/pool/class_PoolEntriesList.php index 9c37b29dd..7de3ce4ab 100644 --- a/application/hub/classes/lists/pool/class_PoolEntriesList.php +++ b/application/hub/classes/lists/pool/class_PoolEntriesList.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Lists\Pool; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Lists\BaseList; use Org\Mxchange\CoreFramework\Lists\Listable; diff --git a/application/hub/classes/miner/chash/class_HubCoinMiner.php b/application/hub/classes/miner/chash/class_HubCoinMiner.php index d5106794b..d4bcfe09a 100644 --- a/application/hub/classes/miner/chash/class_HubCoinMiner.php +++ b/application/hub/classes/miner/chash/class_HubCoinMiner.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Helper\Miner\MinerHelper; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Controller\Controller; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Response\Responseable; diff --git a/application/hub/classes/miner/class_BaseHubMiner.php b/application/hub/classes/miner/class_BaseHubMiner.php index 49f83ae4b..14fbafbc9 100644 --- a/application/hub/classes/miner/class_BaseHubMiner.php +++ b/application/hub/classes/miner/class_BaseHubMiner.php @@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Updateable; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; diff --git a/application/hub/classes/nodes/boot/class_HubBootNode.php b/application/hub/classes/nodes/boot/class_HubBootNode.php index bedb58ef8..50abbdfd7 100644 --- a/application/hub/classes/nodes/boot/class_HubBootNode.php +++ b/application/hub/classes/nodes/boot/class_HubBootNode.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Node\Node; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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\Registry\GenericRegistry; diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index 3478cafe1..5d7620ef5 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -26,7 +26,7 @@ use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; use Org\Mxchange\CoreFramework\Database\Updateable; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; diff --git a/application/hub/classes/nodes/list/class_HubListNode.php b/application/hub/classes/nodes/list/class_HubListNode.php index ee2aafc12..072c50949 100644 --- a/application/hub/classes/nodes/list/class_HubListNode.php +++ b/application/hub/classes/nodes/list/class_HubListNode.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode; use Org\Shipsimu\Hub\Node\Node; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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\Registry\GenericRegistry; diff --git a/application/hub/classes/nodes/master/class_HubMasterNode.php b/application/hub/classes/nodes/master/class_HubMasterNode.php index c1b18a58c..d0ba61167 100644 --- a/application/hub/classes/nodes/master/class_HubMasterNode.php +++ b/application/hub/classes/nodes/master/class_HubMasterNode.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode; use Org\Shipsimu\Hub\Node\Node; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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\Registry\GenericRegistry; diff --git a/application/hub/classes/nodes/regular/class_HubRegularNode.php b/application/hub/classes/nodes/regular/class_HubRegularNode.php index a5bf343a6..535f23292 100644 --- a/application/hub/classes/nodes/regular/class_HubRegularNode.php +++ b/application/hub/classes/nodes/regular/class_HubRegularNode.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Node\BaseHubNode; use Org\Shipsimu\Hub\Node\Node; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +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\Registry\GenericRegistry; diff --git a/application/hub/classes/package/assembler/class_PackageAssembler.php b/application/hub/classes/package/assembler/class_PackageAssembler.php index 7e82fc4aa..c4a7611d7 100644 --- a/application/hub/classes/package/assembler/class_PackageAssembler.php +++ b/application/hub/classes/package/assembler/class_PackageAssembler.php @@ -16,7 +16,7 @@ use Org\Shipsimu\Hub\Traits\Network\Package\Delivery\DeliverableTrait; // Import framework stuff use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Traits\Handler\HandleableTrait; use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait; diff --git a/application/hub/classes/package/fragmenter/class_PackageFragmenter.php b/application/hub/classes/package/fragmenter/class_PackageFragmenter.php index 36798c1c0..17fcb196a 100644 --- a/application/hub/classes/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/classes/package/fragmenter/class_PackageFragmenter.php @@ -12,7 +12,7 @@ use Org\Shipsimu\Hub\Network\Package\DeliverablePackage; use Org\Mxchange\CoreFramework\Assertion\AssertionException; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; use Org\Mxchange\CoreFramework\Utils\String\StringUtils; diff --git a/application/hub/classes/pools/class_BasePool.php b/application/hub/classes/pools/class_BasePool.php index 246ed2aa7..fd6841a0f 100644 --- a/application/hub/classes/pools/class_BasePool.php +++ b/application/hub/classes/pools/class_BasePool.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Pool\Poolable; use Org\Shipsimu\Hub\Traits\Listener\ListenableTrait; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; diff --git a/application/hub/classes/producer/class_BaseProducer.php b/application/hub/classes/producer/class_BaseProducer.php index 2d01f82e6..59d2b2814 100644 --- a/application/hub/classes/producer/class_BaseProducer.php +++ b/application/hub/classes/producer/class_BaseProducer.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Stack\Stackable; /** diff --git a/application/hub/classes/producer/cruncher/keys/cruncher/class_CruncherKeyProducer.php b/application/hub/classes/producer/cruncher/keys/cruncher/class_CruncherKeyProducer.php index 70dd64146..c4057641b 100644 --- a/application/hub/classes/producer/cruncher/keys/cruncher/class_CruncherKeyProducer.php +++ b/application/hub/classes/producer/cruncher/keys/cruncher/class_CruncherKeyProducer.php @@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Producer\BaseProducer; use Org\Shipsimu\Hub\Producer\Key\KeyProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\State\Stateable; diff --git a/application/hub/classes/producer/cruncher/work_units/cruncher/class_CruncherTestUnitProducer.php b/application/hub/classes/producer/cruncher/work_units/cruncher/class_CruncherTestUnitProducer.php index a78388bd9..496247ad4 100644 --- a/application/hub/classes/producer/cruncher/work_units/cruncher/class_CruncherTestUnitProducer.php +++ b/application/hub/classes/producer/cruncher/work_units/cruncher/class_CruncherTestUnitProducer.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Unit\UnitProducer; // Import framework stuff use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\State\Stateable; diff --git a/application/hub/classes/producer/miner/blocks/miner/class_MinerRealGenesisBlockProducer.php b/application/hub/classes/producer/miner/blocks/miner/class_MinerRealGenesisBlockProducer.php index d6cb88c2c..7b8401dc3 100644 --- a/application/hub/classes/producer/miner/blocks/miner/class_MinerRealGenesisBlockProducer.php +++ b/application/hub/classes/producer/miner/blocks/miner/class_MinerRealGenesisBlockProducer.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer; use Org\Shipsimu\Hub\Producer\Miner\Block\BaseBlockProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\State\Stateable; diff --git a/application/hub/classes/producer/miner/blocks/miner/class_MinerTestGenesisBlockProducer.php b/application/hub/classes/producer/miner/blocks/miner/class_MinerTestGenesisBlockProducer.php index eea02e376..c33f1ac63 100644 --- a/application/hub/classes/producer/miner/blocks/miner/class_MinerTestGenesisBlockProducer.php +++ b/application/hub/classes/producer/miner/blocks/miner/class_MinerTestGenesisBlockProducer.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Producer\Block\BlockProducer; use Org\Shipsimu\Hub\Producer\Miner\Block\BaseBlockProducer; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\State\Stateable; diff --git a/application/hub/classes/recipient/dht/class_DhtRecipient.php b/application/hub/classes/recipient/dht/class_DhtRecipient.php index 62e8623a0..5fcccba36 100644 --- a/application/hub/classes/recipient/dht/class_DhtRecipient.php +++ b/application/hub/classes/recipient/dht/class_DhtRecipient.php @@ -11,7 +11,7 @@ use Org\Shipsimu\Hub\Network\Recipient\Recipient; // Import framework stuff use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Lists\Listable; // Import SPL stuff diff --git a/application/hub/classes/registry/socket/class_SocketRegistry.php b/application/hub/classes/registry/socket/class_SocketRegistry.php index 4e513a086..748d15a2c 100644 --- a/application/hub/classes/registry/socket/class_SocketRegistry.php +++ b/application/hub/classes/registry/socket/class_SocketRegistry.php @@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Registry\Socket\RegisterableSocket; // Import framework stuff use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Registry\BaseRegistry; use Org\Mxchange\CoreFramework\Registry\Register; diff --git a/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php b/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php index af3f32414..f0da95607 100644 --- a/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php +++ b/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php @@ -14,7 +14,7 @@ use Org\Shipsimu\Hub\Resolver\Protocol\ProtocolResolver; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools; use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/resolver/state/class_BaseStateResolver.php b/application/hub/classes/resolver/state/class_BaseStateResolver.php index 95dadcad6..5500ad9d2 100644 --- a/application/hub/classes/resolver/state/class_BaseStateResolver.php +++ b/application/hub/classes/resolver/state/class_BaseStateResolver.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Resolver\State; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Resolver\BaseResolver; use Org\Mxchange\CoreFramework\Utils\String\StringUtils; diff --git a/application/hub/classes/source/class_BaseUrlSource.php b/application/hub/classes/source/class_BaseUrlSource.php index d51e6ea76..d8920fdea 100644 --- a/application/hub/classes/source/class_BaseUrlSource.php +++ b/application/hub/classes/source/class_BaseUrlSource.php @@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Crawler\Source\Url; use Org\Shipsimu\Hub\Crawler\Source\BaseSource; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Factory\Stack\FileStackFactory; use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait; diff --git a/application/hub/classes/source/units/class_TestUnitSource.php b/application/hub/classes/source/units/class_TestUnitSource.php index e37653a38..822697362 100644 --- a/application/hub/classes/source/units/class_TestUnitSource.php +++ b/application/hub/classes/source/units/class_TestUnitSource.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Crawler\Source\BaseSource; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php b/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php index aa6f52a11..b11bf5771 100644 --- a/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php +++ b/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php @@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Crawler\Source\Url\UrlSource; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\FrameworkDirectory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Registry\Registerable; diff --git a/application/hub/classes/tools/hub/class_HubTools.php b/application/hub/classes/tools/hub/class_HubTools.php index e8cbeefec..e0cb5172b 100644 --- a/application/hub/classes/tools/hub/class_HubTools.php +++ b/application/hub/classes/tools/hub/class_HubTools.php @@ -13,7 +13,7 @@ use Org\Shipsimu\Hub\Node\Data\InvalidSessionIdException; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; // Import SPL stuff use \InvalidArgumentException; diff --git a/application/hub/config.php b/application/hub/config.php index 44c776f12..9808ba1bc 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -788,7 +788,7 @@ $cfg->setConfigEntry('tcp_socket_accept_wait_sec', 3); $cfg->setConfigEntry('tcp_socket_accept_wait_usec', 0); // CFG: TCP-SOCKET-ENABLE-REUSE-ADDRESS -$cfg->setConfigEntry('tcp_socket_enable_reuse_address', true); +$cfg->setConfigEntry('tcp_socket_enable_reuse_address', 'Y'); // CFG: FILE-SOCKET-LISTEN-BACKLOG $cfg->setConfigEntry('file_socket_listen_backlog', 0); diff --git a/application/hub/exceptions/factory/class_FactoryRequiredParameterException.php b/application/hub/exceptions/factory/class_FactoryRequiredParameterException.php index d670ef5ab..e2d46e12b 100644 --- a/application/hub/exceptions/factory/class_FactoryRequiredParameterException.php +++ b/application/hub/exceptions/factory/class_FactoryRequiredParameterException.php @@ -3,7 +3,7 @@ namespace Org\Shipsimu\Hub\Factory\Parameter; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkException; /** diff --git a/core b/core index ea4641a1e..5e0cb5baf 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit ea4641a1e423961447ad6e0a113278f9d283cbeb +Subproject commit 5e0cb5baf0c78f49644b96da6bd7a2821590526d diff --git a/index.php b/index.php index bc2faf43d..a881011a0 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ namespace Org\Mxchange\CoreFramework\EntryPoint; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Localization\LanguageSystem; -- 2.39.5