From af5743a295d4ce0488a62daee0aee69c801a6f70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 22 May 2017 19:31:22 +0200 Subject: [PATCH] Continued: - imported NodeObjectFactory - imported PackageTagsFactory - imported BaseTag, Tagable - imported XmlTemplateEngineFactory - imported XmlObjectRegistryTemplateEngine - imported Base((Xml)Answer)TemplateEngine, CompileableTemplate - imported ObjectTypeRegistryFactory - added namespaces to configuration entries - separated namespace: Template\Engine MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../discovery/protocol/class_ProtocolDiscovery.php | 1 + application/hub/classes/filter/class_BaseHubFilter.php | 1 + .../class_PackageAnnouncementAnswerTagFilter.php | 1 + .../class_PackageDhtBootstrapAnswerTagFilter.php | 1 + .../class_PackageRequestNodeListAnswerTagFilter.php | 1 + .../filter/tags/class_PackageSelfConnectTagFilter.php | 3 ++- .../class_NodeMessageAnnouncementAnswerHandler.php | 1 + .../class_NodeMessageDhtBootstrapAnswerHandler.php | 1 + .../class_NodeMessageRequestNodeListAnswerHandler.php | 1 + .../classes/handler/raw_data/class_BaseDataHandler.php | 1 + .../raw_data/network/class_BaseRawDataHandler.php | 1 + .../classes/helper/dht/class_DhtBootstrapHelper.php | 3 +++ .../classes/helper/dht/class_DhtPublishEntryHelper.php | 3 +++ .../node/announcement/class_NodeAnnouncementHelper.php | 3 +++ .../class_NodeAnnouncementMessageAnswerHelper.php | 3 +++ .../dht/class_NodeDhtBootstrapMessageAnswerHelper.php | 3 +++ .../class_NodeRequestNodeListMessageAnswerHelper.php | 3 +++ .../node/connection/class_NodeSelfConnectHelper.php | 6 +++++- .../node/requests/class_NodeRequestNodeListHelper.php | 3 +++ .../hub/classes/listener/class_BaseListener.php | 1 + .../decorator/class_SocketFileListenerDecorator.php | 1 + .../decorators/class_ClientTcpListenerDecorator.php | 1 + .../tcp/decorators/class_HubTcpListenerDecorator.php | 1 + .../decorators/class_ClientUdpListenerDecorator.php | 1 + .../udp/decorators/class_HubUdpListenerDecorator.php | 1 + application/hub/classes/nodes/class_BaseHubNode.php | 3 +++ .../hub/classes/package/class_NetworkPackage.php | 3 ++- .../work_units/class_CruncherTestUnitProducer.php | 1 + .../registry/objects/class_ObjectTypeRegistry.php | 2 +- .../states/node/active/class_NodeActiveState.php | 1 + application/hub/classes/tags/class_ | 7 +++++++ .../hub/classes/tags/package/class_PackageTags.php | 7 ++++++- .../tasks/node/tags/class_NodePackageTagsInitTask.php | 3 +++ .../class_XmlAnnouncementTemplateEngine.php | 6 +++++- .../class_XmlAnnouncementAnswerTemplateEngine.php | 6 +++++- application/hub/classes/template/answer/class_ | 10 ++++++++++ .../answer/class_BaseXmlAnswerTemplateEngine.php | 6 +++++- .../dht/class_XmlDhtBootstrapAnswerTemplateEngine.php | 6 +++++- .../class_XmlRequestNodeListAnswerTemplateEngine.php | 7 ++++++- application/hub/classes/template/class_ | 10 ++++++++++ .../classes/template/class_BaseXmlTemplateEngine.php | 4 +++- .../connect/class_XmlSelfConnectTemplateEngine.php | 9 +++++++-- .../dht/class_XmlDhtBootstrapTemplateEngine.php | 6 +++++- .../class_XmlRequestNodeListEntryTemplateEngine.php | 6 +++++- .../objects/class_XmlObjectRegistryTemplateEngine.php | 7 ++++++- .../class_XmlCruncherTestUnitTemplateEngine.php | 6 +++++- .../publish/class_XmlDhtPublishEntryTemplateEngine.php | 6 +++++- .../class_XmlRequestNodeListTemplateEngine.php | 6 +++++- application/hub/config.php | 6 +++--- .../dht/class_NoDhtBootstrapAttemptedException.php | 7 ++++--- core | 2 +- 51 files changed, 163 insertions(+), 26 deletions(-) diff --git a/application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php b/application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php index f49bdc812..1a1448ed8 100644 --- a/application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php +++ b/application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php @@ -4,6 +4,7 @@ namespace Hub\Discovery\Protocol; // Import application-specific stuff use Hub\Discovery\Node\BaseNodeDiscovery; +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Network\Package\NetworkPackage; // Import framework stuff diff --git a/application/hub/classes/filter/class_BaseHubFilter.php b/application/hub/classes/filter/class_BaseHubFilter.php index 0ce246bac..5bb5be73b 100644 --- a/application/hub/classes/filter/class_BaseHubFilter.php +++ b/application/hub/classes/filter/class_BaseHubFilter.php @@ -7,6 +7,7 @@ use Hub\Network\Package\NetworkPackage; use Hub\Network\Receive\Receivable; // Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; use CoreFramework\Filter\BaseFilter; /** diff --git a/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php index f753eee22..56c1d139b 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php @@ -5,6 +5,7 @@ namespace Hub\Filter\Tag\Network\Answer\Announcement; // Import application-specific stuff use Hub\Filter\Node\BaseNodeFilter; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Filter\Filterable; diff --git a/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php index 3be38aee7..1e91d832b 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php @@ -5,6 +5,7 @@ namespace Hub\Filter\Tag\Network\Answer\Dht\Bootstrap; // Import application-specific stuff use Hub\Filter\Node\BaseNodeFilter; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Filter\Filterable; diff --git a/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php b/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php index 6b17e7312..02599a20d 100644 --- a/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php +++ b/application/hub/classes/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php @@ -5,6 +5,7 @@ namespace Hub\Filter\Tag\Network\Answer\Request\NodeList; // Import application-specific stuff use Hub\Filter\Node\BaseNodeFilter; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Filter\Filterable; diff --git a/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php b/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php index b42d235a6..5c59c323c 100644 --- a/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php +++ b/application/hub/classes/filter/tags/class_PackageSelfConnectTagFilter.php @@ -5,6 +5,7 @@ namespace Hub\Filter\Tag\Network\SelfConnect; // Import application-specific stuff use Hub\Filter\Node\BaseNodeFilter; use Hub\Network\Receive\Receivable; +use Hub\Tag\Tagable; // Import framework stuff use CoreFramework\Filter\Filterable; @@ -94,7 +95,7 @@ class PackageSelfConnectTagFilter extends BaseNodeFilter implements FilterablePa */ public function processMessage (array $messageData, Receivable $packageInstance) { // Process generic - $this->genericProcessMessage(BaseTag::TAG_SELF_CONNECT, $messageData, $packageInstance); + $this->genericProcessMessage(Tagable::TAG_SELF_CONNECT, $messageData, $packageInstance); } /** diff --git a/application/hub/classes/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php b/application/hub/classes/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php index 91e807ef7..932b647b1 100644 --- a/application/hub/classes/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php +++ b/application/hub/classes/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php @@ -5,6 +5,7 @@ namespace Hub\Handler\Node\Answer\Announcement; // Import application-specific stuff use Hub\Factory\Node\NodeObjectFactory; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Criteria\Storing\StoreableCriteria; diff --git a/application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php b/application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php index a256faa97..337739152 100644 --- a/application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php +++ b/application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php @@ -5,6 +5,7 @@ namespace Hub\Handler\Answer\Node\DhtBootstrap; // Import application-specific stuff use Hub\Factory\Dht\DhtObjectFactory; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Criteria\Storing\StoreableCriteria; diff --git a/application/hub/classes/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php b/application/hub/classes/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php index f09efd7d4..f2a4aa328 100644 --- a/application/hub/classes/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php +++ b/application/hub/classes/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php @@ -5,6 +5,7 @@ namespace Hub\Handler\Node\Answer\Request\NodeList; // Import application-specific stuff use Hub\Factory\Node\NodeObjectFactory; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; // Import framework stuff use CoreFramework\Criteria\Storing\StoreableCriteria; diff --git a/application/hub/classes/handler/raw_data/class_BaseDataHandler.php b/application/hub/classes/handler/raw_data/class_BaseDataHandler.php index b6a47f15a..6b06d8972 100644 --- a/application/hub/classes/handler/raw_data/class_BaseDataHandler.php +++ b/application/hub/classes/handler/raw_data/class_BaseDataHandler.php @@ -3,6 +3,7 @@ namespace Hub\Handler\Data; // Import application-specific stuff +use Hub\Factory\Node\NodeObjectFactory; use Hub\Network\Deliver\Deliverable; // Import framework stuff diff --git a/application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php b/application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php index 203401447..914baddf6 100644 --- a/application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php +++ b/application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php @@ -4,6 +4,7 @@ namespace Hub\Handler\Network\RawData; // Import application-specific stuff use Hub\Container\Socket\StorableSocket; +use Hub\Factory\Node\NodeObjectFactory; use Hub\Network\Package\NetworkPackage; // Import framework stuff diff --git a/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php b/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php index 29fdc3477..47adf9750 100644 --- a/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php +++ b/application/hub/classes/helper/dht/class_DhtBootstrapHelper.php @@ -8,6 +8,9 @@ use Hub\Generic\BaseHubSystem; use Hub\Helper\BaseHubSystemHelper; use Hub\Network\Package\NetworkPackage; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A Bootstrap Dht helper class * diff --git a/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php b/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php index 174f3e9dc..c93667b52 100644 --- a/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php +++ b/application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php @@ -8,6 +8,9 @@ use Hub\Generic\BaseHubSystem; use Hub\Helper\BaseHubSystemHelper; use Hub\Network\Package\NetworkPackage; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A PublishingEntry Dht helper class * diff --git a/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php b/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php index 78a6e566f..630058a3f 100644 --- a/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php +++ b/application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php @@ -6,6 +6,9 @@ namespace Hub\Node\Helper\Announcement; use Hub\Helper\Node\NodeHelper; use Hub\Network\Package\NetworkPackage; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A helper class for announcing this node to other nodes * diff --git a/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php index 888d9799c..522e8150f 100644 --- a/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php @@ -5,6 +5,9 @@ namespace Hub\Node\Helper\Answer\Announcement; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A AnnouncementMessageAnswer node helper class * diff --git a/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php index ad4a5a64c..7883373ff 100644 --- a/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php @@ -5,6 +5,9 @@ namespace Hub\Node\Helper\Answer\Dht\Bootstrap; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A DhtBootstrapMessageAnswer node helper class * diff --git a/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php b/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php index afd0d34ed..216b28faa 100644 --- a/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php +++ b/application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php @@ -5,6 +5,9 @@ namespace Hub\Node\Helper\Answer\Request\NodeList; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A RequestNodeListMessageAnswer node helper class * diff --git a/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php b/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php index e4e9a6b75..83cb5c7ba 100644 --- a/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php +++ b/application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php @@ -5,6 +5,10 @@ namespace Hub\Node\Helper\SelfConnect; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; use Hub\Network\Package\NetworkPackage; +use Hub\Tag\Tagable; + +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; /** * A SelfConnect hub helper class @@ -43,7 +47,7 @@ class NodeSelfConnectHelper extends BaseNodeHelper implements HelpableNode { $this->setRecipientType(NetworkPackage::NETWORK_TARGET_SELF); // Set package tags - $this->setPackageTags(array(BaseTag::TAG_SELF_CONNECT)); + $this->setPackageTags(array(Tagable::TAG_SELF_CONNECT)); } /** diff --git a/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php b/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php index fcc61c346..27a9f9e39 100644 --- a/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php +++ b/application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php @@ -6,6 +6,9 @@ namespace Hub\Node\Helper\Request\NodeList; use Hub\Helper\Node\NodeHelper; use Hub\Network\Package\NetworkPackage; +// Import framework stuff +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; + /** * A ??? hub helper class * diff --git a/application/hub/classes/listener/class_BaseListener.php b/application/hub/classes/listener/class_BaseListener.php index 575aca243..4b871ece6 100644 --- a/application/hub/classes/listener/class_BaseListener.php +++ b/application/hub/classes/listener/class_BaseListener.php @@ -5,6 +5,7 @@ namespace Hub\Listener; // Import application-specific stuff use Hub\Container\Socket\StorableSocket; use Hub\Factory\Information\Connection\ConnectionInfoFactory; +use Hub\Factory\Node\NodeObjectFactory; use Hub\Generic\BaseHubSystem; use Hub\Network\Package\NetworkPackage; use Hub\Pool\Peer\PoolablePeer; diff --git a/application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php b/application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php index eec70ec0c..6d54616a7 100644 --- a/application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php +++ b/application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Socket; // Import application-specific stuff +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Listener\BaseListenerDecorator; use Hub\Listener\Listenable; diff --git a/application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php b/application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php index 68411d45a..a38d4d2fd 100644 --- a/application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php +++ b/application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Client\Tcp; // Import application-specific stuff +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Listener\BaseListenerDecorator; use Hub\Listener\Listenable; diff --git a/application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php b/application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php index e8bf04c30..f5f2c08b0 100644 --- a/application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php +++ b/application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Hub\Tcp; // Import application-specific stuff +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Listener\BaseListenerDecorator; use Hub\Listener\Listenable; diff --git a/application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php b/application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php index 0caf52c0b..15008105e 100644 --- a/application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php +++ b/application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Client\Udp; // Import application-specific stuff +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Listener\BaseListenerDecorator; use Hub\Listener\Listenable; diff --git a/application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php b/application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php index a6621dbbd..15cd60583 100644 --- a/application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php +++ b/application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Hub\Udp; // Import application-specific stuff +use Hub\Factory\Tag\Package\PackageTagsFactory; use Hub\Listener\BaseListenerDecorator; use Hub\Listener\Listenable; diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index e57002eb6..44d292890 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -5,11 +5,14 @@ namespace Hub\Node; // Import hub-specific stuff use Hub\Database\Frontend\Node\Dht\NodeDistributedHashTableDatabaseWrapper; use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper; +use Hub\Factory\Registry\Object\ObjectTypeRegistryFactory; use Hub\Factory\State\Node\NodeStateFactory; use Hub\Locator\Node\LocateableNode; use Hub\Generic\BaseHubSystem; use Hub\Network\Package\NetworkPackage; use Hub\Network\Receive\Receivable; +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; +use Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine; use Hub\Tools\HubTools; // Import framework stuff diff --git a/application/hub/classes/package/class_NetworkPackage.php b/application/hub/classes/package/class_NetworkPackage.php index feeca4db2..063936dda 100644 --- a/application/hub/classes/package/class_NetworkPackage.php +++ b/application/hub/classes/package/class_NetworkPackage.php @@ -18,6 +18,7 @@ use Hub\Network\Deliver\Deliverable; use Hub\Network\Networkable; use Hub\Network\Package\Fragment\PackageFragmenter; use Hub\Network\Receive\Receivable; +use Hub\Tag\Tagable; use Hub\Tools\HubTools; // Import framework stuff @@ -1524,7 +1525,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R $nodeId = HubTools::resolveNodeIdBySessionId($messageData[self::MESSAGE_ARRAY_SENDER]); // Is 'claim_reward' the message type? - if (in_array(BaseTag::TAG_CLAIM_MINING_REWARD, $messageData[self::MESSAGE_ARRAY_TAGS])) { + if (in_array(Tagable::TAG_CLAIM_MINING_REWARD, $messageData[self::MESSAGE_ARRAY_TAGS])) { /* * Then don't feed this message to the miner as this causes an * endless loop of mining. diff --git a/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php b/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php index 21dd2f1f5..e34d5b8ba 100644 --- a/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php +++ b/application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php @@ -5,6 +5,7 @@ namespace Hub\Cruncher\Producer\Unit; // Import framework stuff use CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Factory\Template\XmlTemplateEngineFactory; use CoreFramework\Registry\Registerable; use CoreFramework\State\Stateable; diff --git a/application/hub/classes/registry/objects/class_ObjectTypeRegistry.php b/application/hub/classes/registry/objects/class_ObjectTypeRegistry.php index 2ddce8585..cc73b12a9 100644 --- a/application/hub/classes/registry/objects/class_ObjectTypeRegistry.php +++ b/application/hub/classes/registry/objects/class_ObjectTypeRegistry.php @@ -1,6 +1,6 @@ initXmlTemplateEngine('node', BaseTag::TAG_SELF_CONNECT); + $templateInstance->initXmlTemplateEngine('node', Tagable::TAG_SELF_CONNECT); // Return the prepared instance return $templateInstance; diff --git a/application/hub/classes/template/dht/class_XmlDhtBootstrapTemplateEngine.php b/application/hub/classes/template/dht/class_XmlDhtBootstrapTemplateEngine.php index 9213893e6..afff5921a 100644 --- a/application/hub/classes/template/dht/class_XmlDhtBootstrapTemplateEngine.php +++ b/application/hub/classes/template/dht/class_XmlDhtBootstrapTemplateEngine.php @@ -1,9 +1,13 @@ setConfigEntry('node_self_connect_stacker_class', 'CoreFramework\Stacker\F $cfg->setConfigEntry('node_request_node_list_stacker_class', 'CoreFramework\Stacker\FiLoStacker'); // CFG: NODE-OBJECT-REGISTRY-TEMPLATE-CLASS -$cfg->setConfigEntry('node_object_registry_template_class', 'XmlObjectRegistryTemplateEngine'); +$cfg->setConfigEntry('node_object_registry_template_class', 'Hub\Template\Engine\Xml\ObjectRegistry\XmlObjectRegistryTemplateEngine'); // CFG: NODE-OBJECT-REGISTRY-TEMPLATE-EXTENSION $cfg->setConfigEntry('node_object_registry_template_extension', '.xml'); @@ -370,7 +370,7 @@ $cfg->setConfigEntry('node_object_registry_template_type', 'xml/object_registry' $cfg->setConfigEntry('node_object_registry_stacker_class', 'CoreFramework\Stacker\FiLoStacker'); // CFG: NODE-OBJECT-TYPE-REGISTRY-CLASS -$cfg->setConfigEntry('node_object_type_registry_class', 'ObjectTypeRegistry'); +$cfg->setConfigEntry('node_object_type_registry_class', 'Hub\Registry\Object\ObjectTypeRegistry'); // CFG: DHT-BOOTSTRAP-TEMPLATE-TYPE $cfg->setConfigEntry('node_dht_bootstrap_template_type', 'xml/dht_bootstrap'); @@ -739,7 +739,7 @@ $cfg->setConfigEntry('universal_node_locator_class', 'Hub\Locator\Node\Universal $cfg->setConfigEntry('recipient_list_class', 'RecipientList'); // CFG: PACKAGE-TAGS-CLASS -$cfg->setConfigEntry('package_tags_class', 'PackageTags'); +$cfg->setConfigEntry('package_tags_class', 'Hub\Tag\Package\PackageTags'); // CFG: TCP-CONNECTION-HELPER-CLASS $cfg->setConfigEntry('tcp_connection_helper_class', 'TcpConnectionHelper'); diff --git a/application/hub/exceptions/dht/class_NoDhtBootstrapAttemptedException.php b/application/hub/exceptions/dht/class_NoDhtBootstrapAttemptedException.php index f977c1c23..a0bf4955b 100644 --- a/application/hub/exceptions/dht/class_NoDhtBootstrapAttemptedException.php +++ b/application/hub/exceptions/dht/class_NoDhtBootstrapAttemptedException.php @@ -2,6 +2,9 @@ // Own namespace namespace Hub\Dht; +// Import application-specific stuff +use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine; + // Import framework stuff use CoreFramework\Generic\FrameworkException; @@ -49,7 +52,5 @@ class NoDhtBootstrapAttemptedException extends FrameworkException { // Call parent exception constructor parent::__construct($message, $code); } -} -// [EOF] -?> +} diff --git a/core b/core index 8180df965..3e5fae60e 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 8180df9650994694ac2db841d91b6bfa2d83d36f +Subproject commit 3e5fae60e3629d3b12cef0bb786f1db7994044ab -- 2.39.5