]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 07:33:47 +0000 (08:33 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 07:33:47 +0000 (08:33 +0100)
- moved DHT-related template classes to proper sub directories
- replaced CompileableTemplate with newly added CompileableXmlTemplate
  interface as this is closer to what the class is about
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
24 files changed:
application/hub/classes/filter/tags/class_PackageDhtBootstrapTagFilter.php
application/hub/classes/handler/data/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php
application/hub/classes/handler/data/message-types/dht/class_NodeMessageDhtBootstrapHandler.php
application/hub/classes/handler/protocol/class_BaseProtocolHandler.php
application/hub/classes/helper/dht/class_DhtBootstrapHelper.php
application/hub/classes/template/xml/announcement/class_XmlAnnouncementTemplateEngine.php
application/hub/classes/template/xml/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php
application/hub/classes/template/xml/answer/class_
application/hub/classes/template/xml/answer/class_BaseXmlAnswerTemplateEngine.php
application/hub/classes/template/xml/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php
application/hub/classes/template/xml/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php
application/hub/classes/template/xml/class_
application/hub/classes/template/xml/connect/class_XmlSelfConnectTemplateEngine.php
application/hub/classes/template/xml/dht/bootstrap/class_XmlDhtBootstrapTemplateEngine.php [new file with mode: 0644]
application/hub/classes/template/xml/dht/class_XmlDhtBootstrapTemplateEngine.php [deleted file]
application/hub/classes/template/xml/dht/publish/class_XmlDhtPublishEntryTemplateEngine.php [new file with mode: 0644]
application/hub/classes/template/xml/entries/class_XmlRequestNodeListEntryTemplateEngine.php
application/hub/classes/template/xml/objects/class_XmlObjectRegistryTemplateEngine.php
application/hub/classes/template/xml/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php
application/hub/classes/template/xml/publish/class_XmlDhtPublishEntryTemplateEngine.php [deleted file]
application/hub/classes/template/xml/requests/class_XmlRequestNodeListTemplateEngine.php
application/hub/config.php
application/hub/interfaces/handler/protocol/class_HandleableProtocol.php
core

index 966ef7a0cf7baca79538ce9c96f379333972c40a..06b98f6760fc6ea9816b3a0b247c087fcca889a9 100644 (file)
@@ -48,13 +48,13 @@ class PackageDhtBootstrapTagFilter extends BaseNodeFilter implements FilterableP
                parent::__construct(__CLASS__);
 
                // Init array
-               $this->dataXmlNodes = array(
+               $this->dataXmlNodes = [
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => '',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => '',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_STATUS      => '',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_MODE        => '',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID       => '',
-               );
+               ];
        }
 
        /**
index 078a3cc5da31365ac96501a1ebff0deb8271a492..1f89332a9d3d5ee86e76465e54729cd145ffaa90 100644 (file)
@@ -53,37 +53,37 @@ class NodeMessageDhtBootstrapAnswerHandler extends BaseMessageHandler implements
                $this->setHandlerName('message_announcement_answer');
 
                // Init message data array
-               $this->messageDataElements = array(
+               $this->messageDataElements = [
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS,
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_STATUS,
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID,
                        BaseXmlAnswerTemplateEngine::ANSWER_STATUS,
-               );
+               ];
 
                // Init message-data->configuration translation array
-               $this->messageToConfig = array(
+               $this->messageToConfig = [
                /*
                        @TODO Why commented out?
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => 'your_external_address',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => 'your_internal_address',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID       => 'your_session_id'
                */
-               );
+               ];
 
                // Init config-copy array
-               $this->configCopy = array(
+               $this->configCopy = [
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => 'external_address',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => 'internal_address',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_STATUS      => 'node_status',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID       => 'session_id',
-               );
+               ];
 
                // Init array
-               $this->searchData = array(
+               $this->searchData = [
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID,
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
-               );
+               ];
        }
 
        /**
index f4b55509e9da8a417b1e0b008e8e69f236b468c8..97373cff78972634b3eea9c5fa59fdc1c0b3b872 100644 (file)
@@ -54,28 +54,28 @@ class NodeMessageDhtBootstrapHandler extends BaseMessageHandler implements Handl
                $this->setHandlerName('message_dht_bootstrap');
 
                // Init message data array
-               $this->messageDataElements = array(
+               $this->messageDataElements = [
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS,
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_STATUS,
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_MODE,
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID,
-               );
+               ];
 
                // Init message-data->configuration translation array
-               $this->messageToConfig = array(
+               $this->messageToConfig = [
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => 'your_external_address',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => 'your_internal_address',
                        XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID       => 'your_session_id'
-               );
+               ];
 
                // Init config-copy array
-               $this->configCopy = array(
+               $this->configCopy = [
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS => 'external_address',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS => 'internal_address',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_NODE_STATUS      => 'node_status',
                        XmlDhtBootstrapAnswerTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID       => 'session_id',
-               );
+               ];
 
                // Init array
                $this->searchData = array(
index a6fc984f60428aaa517edbf98250cd63b3caafaf..d23761a929176be9a134dee08c6b0c6a7090aced 100644 (file)
@@ -83,7 +83,7 @@ abstract class BaseProtocolHandler extends BaseHubHandler implements HandleableP
         * @param       $unl            UNL to test
         * @return      $ifMatches      Whether the found UNL matches own addresss
         */
-       public function isOwnAddress ($unl) {
+       public function isOwnAddress (string $unl) {
                // Get own external UNL
                $externalUnl = HubTools::determineOwnExternalAddress();
 
index ac9d605afebdf0c482f26fadd7ec799340311340..76c78d1b914425dde3431af4106c2d84c8d0b00c 100644 (file)
@@ -75,6 +75,7 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
         */
        public function loadDescriptorXml (Distributable $dhtInstance) {
                // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DHT-BOOTSTRAP-HELPER: dhtInstance=%s - CALLED!', $dhtInstance->__toString()));
                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HELPER: Starting with DHT boostrap ...');
 
                // Get a XML template instance
@@ -88,6 +89,9 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
 
                // Render the XML content
                $templateInstance->renderXmlContent();
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HELPER: EXIT!');
        }
 
        /**
@@ -97,27 +101,25 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
         * @return      void
         */
        public function sendPackage (Distributable $dhtInstance) {
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HELPER: CALLED!');
-
                /*
                 * Sanity check: Is the DHT in the approx. state? 'init' for bootstrap
                 * nodes and 'virgin' for all others.
                 */
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DHT-BOOTSTRAP-HELPER: dhtInstance=%s - CALLED!', $dhtInstance->__toString()));
                $dhtInstance->getStateInstance()->validateDhtStateIsVirginOrInit();
 
                // Compile the template, this inserts the loaded dht data into the gaps.
                $this->getTemplateInstance()->compileTemplate();
 
                // Get a singleton network package instance
-               $packageInstance = NetworkPackageHandlerFactory::createNetworkPackageHandlerInstance();
+               $handlerInstance = NetworkPackageHandlerFactory::createNetworkPackageHandlerInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
                //* DEBUG: */ die(__METHOD__ . ':dhtInstance=' . print_r($dhtInstance, TRUE));
-               $packageInstance->enqueueRawDataFromTemplate($this);
+               $handlerInstance->enqueueRawDataFromTemplate($this);
 
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HELPER: EXIT!');
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-BOOTSTRAP-HELPER: EXIT!');
        }
 
 }
index 272dac68aabc752916699d6abaeee18f6da81dcd..5195d786fddabe75c8040982387fc63b2f2e6456 100644 (file)
@@ -6,8 +6,8 @@ namespace Org\Shipsimu\Hub\Template\Engine\Xml\Announcement;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An Announcement template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Some XML nodes must be available for later data extraction
         */
@@ -97,7 +97,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com
         * @param       $characters             Characters to handle
         * @return      void
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -362,7 +362,5 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_announcement');
        }
-}
 
-// [EOF]
-?>
+}
index 09eb6b1ad0ab4399f231093154a62ce782178298..0a1ef4315bf5295e3ae36061565d8ae99b986b89 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An AnnouncementAnswer template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableTemplate, Registerable {
+class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Some XML nodes must be available for later data extraction
         */
@@ -105,7 +105,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -410,7 +410,5 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_announcement_answer');
        }
-}
 
-// [EOF]
-?>
+}
index 19ad3bb9781e92d106ba811714b09c39fdd40a0b..6bac5be310416a4f7402cc36c98d66efe7c5d871 100644 (file)
@@ -7,7 +7,7 @@ use Org\Mxchange\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An ??? answer template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class Xml???AnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableTemplate, Registerable {
+class Xml???AnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Protected constructor
         *
@@ -114,7 +114,5 @@ class Xml???AnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements
                // Pop the last entry
                $this->getStackInstance()->popNamed('!!!');
        }
-}
 
-// [EOF]
-?>
+}
index 4d5eea307b4419652df5cf6b9744b18263992112..a5e6a25ad8726ac401c87f635ac818b392cecaac 100644 (file)
@@ -6,8 +6,8 @@ namespace Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An generic answer template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-abstract class BaseXmlAnswerTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+abstract class BaseXmlAnswerTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Generic 'answer-status' field
         */
index 3d15afdc1772b986bf169139869e886e7835355a..c155bc8da8106737f795eaa10d41ec8c8beebca1 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An DhtBootstrapAnswer template engine class for XML templates
@@ -33,7 +33,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableTemplate, Registerable {
+class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Some XML nodes must be available for later data extraction
         */
@@ -54,7 +54,7 @@ class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                parent::__construct(__CLASS__);
 
                // Init sub-nodes array
-               $this->setSubNodes(array(
+               $this->setSubNodes([
                        // These nodes don't contain any data
                        'my-data',
                        'your-data',
@@ -71,7 +71,7 @@ class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                        self::ANSWER_STATUS,
                        // DHT node list
                        self::DHT_BOOTSTRAP_DATA_NODE_LIST,
-               ));
+               ]);
        }
 
        /**
@@ -104,7 +104,7 @@ class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -389,7 +389,5 @@ class XmlDhtBootstrapAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_dht_bootstrap_answer');
        }
-}
 
-// [EOF]
-?>
+}
index f954b517d65a4d6dc9c69f9ffa5582d1bd6bae5f..b8168c28ca4e23bf9f91d710243da464b641a794 100644 (file)
@@ -8,7 +8,7 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEng
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * A RequestNodeListAnswer template engine class for XML templates
@@ -33,7 +33,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableTemplate, Registerable {
+class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine implements CompileableXmlTemplate, Registerable {
        // Constants for array elements
        const REQUEST_DATA_SESSION_ID    = 'session-id';
        const REQUEST_DATA_NODE_LIST     = 'node-list';
@@ -92,7 +92,7 @@ class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -177,7 +177,5 @@ class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_request_node_list_answer');
        }
-}
 
-// [EOF]
-?>
+}
index 707cea3ae71652bc385973be7200fa8ddb489c7f..adef7c467da868258a9bb76c8907936b65e0fc89 100644 (file)
@@ -7,7 +7,7 @@ use Org\Mxchange\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An ??? template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class Xml???TemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class Xml???TemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Protected constructor
         *
@@ -114,7 +114,5 @@ class Xml???TemplateEngine extends BaseXmlTemplateEngine implements CompileableT
                // Pop the last entry
                $this->getStackInstance()->popNamed('!!!');
        }
-}
 
-// [EOF]
-?>
+}
index eaf2ec1b88e99db13591a61fe98ca86ad03a9aed..e6146ec865e06448de6e21e66f89bb7abbe24e5c 100644 (file)
@@ -7,7 +7,7 @@ use Org\Shipsimu\Hub\Tag\Tagable;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
 
 /**
@@ -33,7 +33,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Data nodes
         */
@@ -87,7 +87,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
diff --git a/application/hub/classes/template/xml/dht/bootstrap/class_XmlDhtBootstrapTemplateEngine.php b/application/hub/classes/template/xml/dht/bootstrap/class_XmlDhtBootstrapTemplateEngine.php
new file mode 100644 (file)
index 0000000..d769acd
--- /dev/null
@@ -0,0 +1,287 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap;
+
+// Import application-specific stuff
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
+use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+
+/**
+ * An Bootstrap template engine class for XML templates
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ * @todo               This template engine does not make use of setTemplateType()
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class XmlDhtBootstrapTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
+       /**
+        * Some XML nodes must be available for later data extraction
+        */
+       const DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA   = 'dht-bootstrap-data';
+       const DHT_BOOTSTRAP_DATA_SESSION_ID       = 'session-id';
+       const DHT_BOOTSTRAP_DATA_NODE_STATUS      = 'node-status';
+       const DHT_BOOTSTRAP_DATA_NODE_MODE        = 'node-mode';
+       const DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS = 'external-address';
+       const DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS = 'internal-address';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Init array
+               $this->setSubNodes([
+                       self::DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA,
+                       'listener',
+                       self::DHT_BOOTSTRAP_DATA_NODE_STATUS,
+                       self::DHT_BOOTSTRAP_DATA_NODE_MODE,
+                       self::DHT_BOOTSTRAP_DATA_SESSION_ID,
+                       self::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
+                       self::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS
+               ]);
+       }
+
+       /**
+        * Creates an instance of the class TemplateEngine and prepares it for usage
+        *
+        * @return      $templateInstance               An instance of TemplateEngine
+        * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
+        * @throws      InvalidBasePathStringException  If $templateBasePath is no string
+        * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
+        *                                                                                      directory or not found
+        * @throws      BasePathReadProtectedException  If $templateBasePath is
+        *                                                                                      read-protected
+        */
+       public static final function createXmlDhtBootstrapTemplateEngine () {
+               // Get a new instance
+               $templateInstance = new XmlDhtBootstrapTemplateEngine();
+
+               // Init template instance
+               $templateInstance->initXmlTemplateEngine('node', 'dht_bootstrap');
+
+               // Return the prepared instance
+               return $templateInstance;
+       }
+
+       /**
+        * Currently not used
+        *
+        * @param       $resource               XML parser resource (currently ignored)
+        * @param       $characters             Characters to handle
+        * @return      void
+        */
+       public function characterHandler ($resource, string $characters) {
+               // Trim all spaces away
+               //* NOISY-DEBIG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-DHT-BOOTSTRAP-TEMPLATE-ENGINE: resource[%s]=%s,characters(%d)=%s - CALLED!', gettype($resource), $resource, strlen($characters), $characters));
+               $characters = trim($characters);
+
+               // Is this string empty?
+               if (empty($characters)) {
+                       // Then skip it silently
+                       return;
+               }
+
+               /*
+                * Assign the found characters to variable and use the last entry from
+                * stack as the name.
+                */
+               //* NOISY-DEBIG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-DHT-BOOTSTRAP-TEMPLATE-ENGINE: Current node: %s', $this->getStackInstance()->getNamed('dht_bootstrap')));
+               parent::assignVariable($this->getStackInstance()->getNamed('dht_bootstrap'), $characters);
+
+               // Trace message
+               //* NOISY-DEBIG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('XML-DHT-BOOTSTRAP-TEMPLATE-ENGINE: EXIT!');
+       }
+
+       /**
+        * Getter for cache file (FQFN)
+        *
+        * @return      $fqfn   Full-qualified file name of the menu cache
+        */
+       public function getMenuCacheFqfn () {
+               $this->partialStub('Please implement this method.');
+       }
+
+       /**
+        * Starts the dht bootstrap
+        *
+        * @return      void
+        */
+       protected function startDhtBootstrap () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', 'dht-bootstrap');
+       }
+
+       /**
+        * Starts the dht bootstrap data
+        *
+        * @return      void
+        */
+       protected function startDhtBootstrapData () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA);
+       }
+
+       /**
+        * Starts the node status
+        *
+        * @return      void
+        */
+       protected function startNodeStatus () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_NODE_STATUS);
+       }
+
+       /**
+        * Starts the node-mode
+        *
+        * @return      void
+        */
+       protected function startNodeMode () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_NODE_MODE);
+       }
+
+       /**
+        * Starts the listener
+        *
+        * @return      void
+        */
+       protected function startListener () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', 'listener');
+       }
+
+       /**
+        * Starts the public ip
+        *
+        * @return      void
+        */
+       protected function startExternalAddress () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS);
+       }
+
+       /**
+        * Starts the private ip
+        *
+        * @return      void
+        */
+       protected function startInternalAddress () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS);
+       }
+
+       /**
+        * Starts the session id
+        *
+        * @return      void
+        */
+       protected function startSessionId () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_SESSION_ID);
+       }
+
+       /**
+        * Finishes the session id
+        *
+        * @return      void
+        */
+       protected function finishSessionId () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the private ip
+        *
+        * @return      void
+        */
+       protected function finishInternalAddress () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the public ip
+        *
+        * @return      void
+        */
+       protected function finishExternalAddress () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the listener
+        *
+        * @return      void
+        */
+       protected function finishListener () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the node mode
+        *
+        * @return      void
+        */
+       protected function finishNodeMode () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the node status
+        *
+        * @return      void
+        */
+       protected function finishNodeStatus () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the dht bootstrap data
+        *
+        * @return      void
+        */
+       protected function finishDhtBootstrapData () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+       /**
+        * Finishes the dht bootstrap
+        *
+        * @return      void
+        */
+       protected function finishDhtBootstrap () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_bootstrap');
+       }
+
+}
diff --git a/application/hub/classes/template/xml/dht/class_XmlDhtBootstrapTemplateEngine.php b/application/hub/classes/template/xml/dht/class_XmlDhtBootstrapTemplateEngine.php
deleted file mode 100644 (file)
index ea51a1f..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap;
-
-// Import application-specific stuff
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
-use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
-
-/**
- * An Bootstrap template engine class for XML templates
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- * @todo               This template engine does not make use of setTemplateType()
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class XmlDhtBootstrapTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
-       /**
-        * Some XML nodes must be available for later data extraction
-        */
-       const DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA   = 'dht-bootstrap-data';
-       const DHT_BOOTSTRAP_DATA_SESSION_ID       = 'session-id';
-       const DHT_BOOTSTRAP_DATA_NODE_STATUS      = 'node-status';
-       const DHT_BOOTSTRAP_DATA_NODE_MODE        = 'node-mode';
-       const DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS = 'external-address';
-       const DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS = 'internal-address';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Init array
-               $this->setSubNodes(array(
-                       self::DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA,
-                       'listener',
-                       self::DHT_BOOTSTRAP_DATA_NODE_STATUS,
-                       self::DHT_BOOTSTRAP_DATA_NODE_MODE,
-                       self::DHT_BOOTSTRAP_DATA_SESSION_ID,
-                       self::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
-                       self::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS
-               ));
-       }
-
-       /**
-        * Creates an instance of the class TemplateEngine and prepares it for usage
-        *
-        * @return      $templateInstance               An instance of TemplateEngine
-        * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
-        * @throws      InvalidBasePathStringException  If $templateBasePath is no string
-        * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
-        *                                                                                      directory or not found
-        * @throws      BasePathReadProtectedException  If $templateBasePath is
-        *                                                                                      read-protected
-        */
-       public static final function createXmlDhtBootstrapTemplateEngine () {
-               // Get a new instance
-               $templateInstance = new XmlDhtBootstrapTemplateEngine();
-
-               // Init template instance
-               $templateInstance->initXmlTemplateEngine('node', 'dht_bootstrap');
-
-               // Return the prepared instance
-               return $templateInstance;
-       }
-
-       /**
-        * Currently not used
-        *
-        * @param       $resource               XML parser resource (currently ignored)
-        * @param       $characters             Characters to handle
-        * @return      void
-        */
-       public function characterHandler ($resource, $characters) {
-               // Trim all spaces away
-               $characters = trim($characters);
-
-               // Is this string empty?
-               if (empty($characters)) {
-                       // Then skip it silently
-                       return;
-               } // END - if
-
-               /*
-                * Assign the found characters to variable and use the last entry from
-                * stack as the name.
-                */
-               parent::assignVariable($this->getStackInstance()->getNamed('dht_bootstrap'), $characters);
-       }
-
-       /**
-        * Getter for cache file (FQFN)
-        *
-        * @return      $fqfn   Full-qualified file name of the menu cache
-        */
-       public function getMenuCacheFqfn () {
-               $this->partialStub('Please implement this method.');
-       }
-
-       /**
-        * Starts the dht bootstrap
-        *
-        * @return      void
-        */
-       protected function startDhtBootstrap () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', 'dht-bootstrap');
-       }
-
-       /**
-        * Starts the dht bootstrap data
-        *
-        * @return      void
-        */
-       protected function startDhtBootstrapData () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA);
-       }
-
-       /**
-        * Starts the node status
-        *
-        * @return      void
-        */
-       protected function startNodeStatus () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_NODE_STATUS);
-       }
-
-       /**
-        * Starts the node-mode
-        *
-        * @return      void
-        */
-       protected function startNodeMode () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_NODE_MODE);
-       }
-
-       /**
-        * Starts the listener
-        *
-        * @return      void
-        */
-       protected function startListener () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', 'listener');
-       }
-
-       /**
-        * Starts the public ip
-        *
-        * @return      void
-        */
-       protected function startExternalAddress () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS);
-       }
-
-       /**
-        * Starts the private ip
-        *
-        * @return      void
-        */
-       protected function startInternalAddress () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS);
-       }
-
-       /**
-        * Starts the session id
-        *
-        * @return      void
-        */
-       protected function startSessionId () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_bootstrap', self::DHT_BOOTSTRAP_DATA_SESSION_ID);
-       }
-
-       /**
-        * Finishes the session id
-        *
-        * @return      void
-        */
-       protected function finishSessionId () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the private ip
-        *
-        * @return      void
-        */
-       protected function finishInternalAddress () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the public ip
-        *
-        * @return      void
-        */
-       protected function finishExternalAddress () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the listener
-        *
-        * @return      void
-        */
-       protected function finishListener () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the node mode
-        *
-        * @return      void
-        */
-       protected function finishNodeMode () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the node status
-        *
-        * @return      void
-        */
-       protected function finishNodeStatus () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the dht bootstrap data
-        *
-        * @return      void
-        */
-       protected function finishDhtBootstrapData () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-
-       /**
-        * Finishes the dht bootstrap
-        *
-        * @return      void
-        */
-       protected function finishDhtBootstrap () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_bootstrap');
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/classes/template/xml/dht/publish/class_XmlDhtPublishEntryTemplateEngine.php b/application/hub/classes/template/xml/dht/publish/class_XmlDhtPublishEntryTemplateEngine.php
new file mode 100644 (file)
index 0000000..c00113a
--- /dev/null
@@ -0,0 +1,366 @@
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Publish;
+
+// Import application-specific stuff
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
+
+/**
+ * An PublishEntry template engine class for XML templates
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ * @todo               This template engine does not make use of setTemplateType()
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class XmlDhtPublishEntryTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
+       /**
+        * Some XML nodes must be available for later data extraction
+        */
+       const PUBLISH_DATA_NODE_ID               = 'node-id';
+       const PUBLISH_DATA_SESSION_ID            = 'session-id';
+       const PUBLISH_DATA_NODE_STATUS           = 'node-status';
+       const PUBLISH_DATA_NODE_MODE             = 'node-mode';
+       const PUBLISH_DATA_EXTERNAL_ADDRESS      = 'external-address';
+       const PUBLISH_DATA_PRIVATE_KEY_HASH      = 'private-key-hash';
+       const PUBLISH_DATA_ACCEPTED_OBJECT_TYPES = 'accepted-object-types';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Init array
+               $this->setSubNodes(array(
+                       'publish-data',
+                       'listener',
+                       self::PUBLISH_DATA_NODE_STATUS,
+                       self::PUBLISH_DATA_NODE_MODE,
+                       self::PUBLISH_DATA_PRIVATE_KEY_HASH,
+                       self::PUBLISH_DATA_ACCEPTED_OBJECT_TYPES,
+                       self::PUBLISH_DATA_NODE_ID,
+                       self::PUBLISH_DATA_SESSION_ID,
+                       self::PUBLISH_DATA_EXTERNAL_ADDRESS,
+                       'object-type-list',
+               ));
+       }
+
+       /**
+        * Creates an instance of the class TemplateEngine and prepares it for usage
+        *
+        * @return      $templateInstance               An instance of TemplateEngine
+        * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
+        * @throws      InvalidBasePathStringException  If $templateBasePath is no string
+        * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
+        *                                                                                      directory or not found
+        * @throws      BasePathReadProtectedException  If $templateBasePath is
+        *                                                                                      read-protected
+        */
+       public static final function createXmlDhtPublishEntryTemplateEngine () {
+               // Get a new instance
+               $templateInstance = new XmlDhtPublishEntryTemplateEngine();
+
+               // Init template instance
+               $templateInstance->initXmlTemplateEngine('node', 'dht_publish');
+
+               // Return the prepared instance
+               return $templateInstance;
+       }
+
+       /**
+        * Currently not used
+        *
+        * @param       $resource               XML parser resource (currently ignored)
+        * @param       $characters             Characters to handle
+        * @return      void
+        */
+       public function characterHandler ($resource, string $characters) {
+               // Trim all spaces away
+               $characters = trim($characters);
+
+               // Is this string empty?
+               if (empty($characters)) {
+                       // Then skip it silently
+                       return;
+               } // END - if
+
+               /*
+                * Assign the found characters to variable and use the last entry from
+                * stack as the name.
+                */
+               parent::assignVariable($this->getStackInstance()->getNamed('dht_publish'), $characters);
+       }
+
+       /**
+        * Getter for cache file (FQFN)
+        *
+        * @return      $fqfn   Full-qualified file name of the menu cache
+        */
+       public function getMenuCacheFqfn () {
+               $this->partialStub('Please implement this method.');
+       }
+
+       /**
+        * Starts the publish
+        *
+        * @return      void
+        */
+       protected function startPublish () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', 'publish');
+       }
+
+       /**
+        * Starts the publish data
+        *
+        * @return      void
+        */
+       protected function startPublishData () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', 'publish-data');
+       }
+
+       /**
+        * Starts the node status
+        *
+        * @return      void
+        */
+       protected function startNodeStatus () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_STATUS);
+       }
+
+       /**
+        * Starts the node-mode
+        *
+        * @return      void
+        */
+       protected function startNodeMode () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_MODE);
+       }
+
+       /**
+        * Starts the listener
+        *
+        * @return      void
+        */
+       protected function startListener () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', 'listener');
+       }
+
+       /**
+        * Starts accepted object types
+        *
+        * @return      void
+        */
+       protected function startAcceptedObjectTypes () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_ACCEPTED_OBJECT_TYPES);
+       }
+
+       /**
+        * Starts hash from private key
+        *
+        * @return      void
+        */
+       protected function startPrivateKeyHash () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_PRIVATE_KEY_HASH);
+       }
+
+       /**
+        * Starts the node id
+        *
+        * @return      void
+        */
+       protected function startNodeId () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_ID);
+       }
+
+       /**
+        * Starts the session id
+        *
+        * @return      void
+        */
+       protected function startSessionId () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_SESSION_ID);
+       }
+
+       /**
+        * Starts the public ip
+        *
+        * @return      void
+        */
+       protected function startExternalAddress () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_EXTERNAL_ADDRESS);
+       }
+
+       /**
+        * Starts the object type list
+        *
+        * @return      void
+        */
+       protected function startObjectTypeList () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', 'object-type-list');
+       }
+
+       /**
+        * Starts the object type
+        *
+        * @return      void
+        */
+       protected function startObjectType () {
+               // Push the node name on the stacker
+               $this->getStackInstance()->pushNamed('dht_publish', 'object-type');
+       }
+
+       /**
+        * Finishes the object type
+        *
+        * @return      void
+        */
+       protected function finishObjectType () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the object type list
+        *
+        * @return      void
+        */
+       protected function finishObjectTypeList () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the session id
+        *
+        * @return      void
+        */
+       protected function finishSessionId () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the node id
+        *
+        * @return      void
+        */
+       protected function finishNodeId () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the public ip
+        *
+        * @return      void
+        */
+       protected function finishExternalAddress () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes hash from private key
+        *
+        * @return      void
+        */
+       protected function finishPrivateKeyHash () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes accepted object types
+        *
+        * @return      void
+        */
+       protected function finishAcceptedObjectTypes () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the listener
+        *
+        * @return      void
+        */
+       protected function finishListener () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the node mode
+        *
+        * @return      void
+        */
+       protected function finishNodeMode () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the node status
+        *
+        * @return      void
+        */
+       protected function finishNodeStatus () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the publish data
+        *
+        * @return      void
+        */
+       protected function finishPublishData () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+       /**
+        * Finishes the publish
+        *
+        * @return      void
+        */
+       protected function finishPublish () {
+               // Pop the last entry
+               $this->getStackInstance()->popNamed('dht_publish');
+       }
+
+}
index aff38500bcdbc2f17c23caefebb948567cfe19ed..a79701face8a216839f6d8d6dbfee811e7c7319a 100644 (file)
@@ -6,7 +6,7 @@ namespace Org\Shipsimu\Hub\Template\Engine\Xml\Request\NodeList;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
 
 /**
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlRequestNodeListEntryTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlRequestNodeListEntryTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Protected constructor
         *
@@ -73,7 +73,7 @@ class XmlRequestNodeListEntryTemplateEngine extends BaseXmlTemplateEngine implem
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -115,7 +115,5 @@ class XmlRequestNodeListEntryTemplateEngine extends BaseXmlTemplateEngine implem
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_request_node_list_entry');
        }
-}
 
-// [EOF]
-?>
+}
index 5edc06dbd68ee9bd741a6512aed1446f5a70c50f..8ae96ea15158ebb040ae83ae68a57fa6e335480b 100644 (file)
@@ -8,8 +8,8 @@ use Org\Shipsimu\Hub\Factory\Registry\Object\ObjectTypeRegistryFactory;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An ObjectRegistry template engine class for XML templates
@@ -34,7 +34,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        // Constants
        const OBJECT_TYPE_DATA_NAME                 = 'object-name';
        const OBJECT_TYPE_DATA_RECIPIENT_LIMITATION = 'object-recipient-limitation';
@@ -100,7 +100,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C
         * @param       $characters             Characters to handle
         * @return      void
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-OBJECT-REGISTRY-TEMPLATE-ENGINE: resource[%s]=%s,characters[%s]=%s - CALLED!', gettype($resource), $resource, gettype($characters), $characters));
                $characters = trim($characters);
index 36b805bb250c4cf9116a5615cfe8699df1c79cc0..634a825b77493e469fe67685f74dbbbbd789a2d7 100644 (file)
@@ -6,8 +6,8 @@ namespace Org\Shipsimu\Hub\Cruncher\Template\Engine\Xml\TestUnit;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An TestUnit template engine class for XML templates
@@ -32,7 +32,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        /**
         * Protected constructor
         *
@@ -88,7 +88,7 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
         * @param       $characters             Characters to handle
         * @return      void
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -373,7 +373,5 @@ class XmlCruncherTestUnitTemplateEngine extends BaseXmlTemplateEngine implements
                // Pop the last entry
                $this->getStackInstance()->popNamed('cruncher_test_unit');
        }
-}
 
-// [EOF]
-?>
+}
diff --git a/application/hub/classes/template/xml/publish/class_XmlDhtPublishEntryTemplateEngine.php b/application/hub/classes/template/xml/publish/class_XmlDhtPublishEntryTemplateEngine.php
deleted file mode 100644 (file)
index 4f818bf..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Publish;
-
-// Import application-specific stuff
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
-use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
-
-/**
- * An PublishEntry template engine class for XML templates
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2018 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- * @todo               This template engine does not make use of setTemplateType()
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class XmlDhtPublishEntryTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
-       /**
-        * Some XML nodes must be available for later data extraction
-        */
-       const PUBLISH_DATA_NODE_ID               = 'node-id';
-       const PUBLISH_DATA_SESSION_ID            = 'session-id';
-       const PUBLISH_DATA_NODE_STATUS           = 'node-status';
-       const PUBLISH_DATA_NODE_MODE             = 'node-mode';
-       const PUBLISH_DATA_EXTERNAL_ADDRESS      = 'external-address';
-       const PUBLISH_DATA_PRIVATE_KEY_HASH      = 'private-key-hash';
-       const PUBLISH_DATA_ACCEPTED_OBJECT_TYPES = 'accepted-object-types';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-
-               // Init array
-               $this->setSubNodes(array(
-                       'publish-data',
-                       'listener',
-                       self::PUBLISH_DATA_NODE_STATUS,
-                       self::PUBLISH_DATA_NODE_MODE,
-                       self::PUBLISH_DATA_PRIVATE_KEY_HASH,
-                       self::PUBLISH_DATA_ACCEPTED_OBJECT_TYPES,
-                       self::PUBLISH_DATA_NODE_ID,
-                       self::PUBLISH_DATA_SESSION_ID,
-                       self::PUBLISH_DATA_EXTERNAL_ADDRESS,
-                       'object-type-list',
-               ));
-       }
-
-       /**
-        * Creates an instance of the class TemplateEngine and prepares it for usage
-        *
-        * @return      $templateInstance               An instance of TemplateEngine
-        * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
-        * @throws      InvalidBasePathStringException  If $templateBasePath is no string
-        * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
-        *                                                                                      directory or not found
-        * @throws      BasePathReadProtectedException  If $templateBasePath is
-        *                                                                                      read-protected
-        */
-       public static final function createXmlDhtPublishEntryTemplateEngine () {
-               // Get a new instance
-               $templateInstance = new XmlDhtPublishEntryTemplateEngine();
-
-               // Init template instance
-               $templateInstance->initXmlTemplateEngine('node', 'dht_publish');
-
-               // Return the prepared instance
-               return $templateInstance;
-       }
-
-       /**
-        * Currently not used
-        *
-        * @param       $resource               XML parser resource (currently ignored)
-        * @param       $characters             Characters to handle
-        * @return      void
-        */
-       public function characterHandler ($resource, $characters) {
-               // Trim all spaces away
-               $characters = trim($characters);
-
-               // Is this string empty?
-               if (empty($characters)) {
-                       // Then skip it silently
-                       return;
-               } // END - if
-
-               /*
-                * Assign the found characters to variable and use the last entry from
-                * stack as the name.
-                */
-               parent::assignVariable($this->getStackInstance()->getNamed('dht_publish'), $characters);
-       }
-
-       /**
-        * Getter for cache file (FQFN)
-        *
-        * @return      $fqfn   Full-qualified file name of the menu cache
-        */
-       public function getMenuCacheFqfn () {
-               $this->partialStub('Please implement this method.');
-       }
-
-       /**
-        * Starts the publish
-        *
-        * @return      void
-        */
-       protected function startPublish () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', 'publish');
-       }
-
-       /**
-        * Starts the publish data
-        *
-        * @return      void
-        */
-       protected function startPublishData () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', 'publish-data');
-       }
-
-       /**
-        * Starts the node status
-        *
-        * @return      void
-        */
-       protected function startNodeStatus () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_STATUS);
-       }
-
-       /**
-        * Starts the node-mode
-        *
-        * @return      void
-        */
-       protected function startNodeMode () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_MODE);
-       }
-
-       /**
-        * Starts the listener
-        *
-        * @return      void
-        */
-       protected function startListener () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', 'listener');
-       }
-
-       /**
-        * Starts accepted object types
-        *
-        * @return      void
-        */
-       protected function startAcceptedObjectTypes () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_ACCEPTED_OBJECT_TYPES);
-       }
-
-       /**
-        * Starts hash from private key
-        *
-        * @return      void
-        */
-       protected function startPrivateKeyHash () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_PRIVATE_KEY_HASH);
-       }
-
-       /**
-        * Starts the node id
-        *
-        * @return      void
-        */
-       protected function startNodeId () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_NODE_ID);
-       }
-
-       /**
-        * Starts the session id
-        *
-        * @return      void
-        */
-       protected function startSessionId () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_SESSION_ID);
-       }
-
-       /**
-        * Starts the public ip
-        *
-        * @return      void
-        */
-       protected function startExternalAddress () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', self::PUBLISH_DATA_EXTERNAL_ADDRESS);
-       }
-
-       /**
-        * Starts the object type list
-        *
-        * @return      void
-        */
-       protected function startObjectTypeList () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', 'object-type-list');
-       }
-
-       /**
-        * Starts the object type
-        *
-        * @return      void
-        */
-       protected function startObjectType () {
-               // Push the node name on the stacker
-               $this->getStackInstance()->pushNamed('dht_publish', 'object-type');
-       }
-
-       /**
-        * Finishes the object type
-        *
-        * @return      void
-        */
-       protected function finishObjectType () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the object type list
-        *
-        * @return      void
-        */
-       protected function finishObjectTypeList () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the session id
-        *
-        * @return      void
-        */
-       protected function finishSessionId () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the node id
-        *
-        * @return      void
-        */
-       protected function finishNodeId () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the public ip
-        *
-        * @return      void
-        */
-       protected function finishExternalAddress () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes hash from private key
-        *
-        * @return      void
-        */
-       protected function finishPrivateKeyHash () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes accepted object types
-        *
-        * @return      void
-        */
-       protected function finishAcceptedObjectTypes () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the listener
-        *
-        * @return      void
-        */
-       protected function finishListener () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the node mode
-        *
-        * @return      void
-        */
-       protected function finishNodeMode () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the node status
-        *
-        * @return      void
-        */
-       protected function finishNodeStatus () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the publish data
-        *
-        * @return      void
-        */
-       protected function finishPublishData () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-
-       /**
-        * Finishes the publish
-        *
-        * @return      void
-        */
-       protected function finishPublish () {
-               // Pop the last entry
-               $this->getStackInstance()->popNamed('dht_publish');
-       }
-}
-
-// [EOF]
-?>
index 84f1f95aa9acd9b1fc277fba36c4f098bf799c79..19ef10e986a8500815996db05ee007ee1b0e18cf 100644 (file)
@@ -7,8 +7,8 @@ use Org\Shipsimu\Hub\Template\Engine\Xml\Request\NodeList\XmlRequestNodeListTemp
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
 
 /**
  * An RequestNodeList template engine class for XML templates
@@ -33,7 +33,7 @@ use Org\Mxchange\CoreFramework\Template\Engine\Xml\BaseXmlTemplateEngine;
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class XmlRequestNodeListTemplateEngine extends BaseXmlTemplateEngine implements CompileableTemplate, Registerable {
+class XmlRequestNodeListTemplateEngine extends BaseXmlTemplateEngine implements CompileableXmlTemplate, Registerable {
        // Constants for array elements
        const REQUEST_DATA_ACCEPTED_OBJECT_TYPES = 'accepted-object-types';
        const REQUEST_DATA_SESSION_ID            = 'session-id';
@@ -84,7 +84,7 @@ class XmlRequestNodeListTemplateEngine extends BaseXmlTemplateEngine implements
         * @return      void
         * @todo        Find something useful with this!
         */
-       public function characterHandler ($resource, $characters) {
+       public function characterHandler ($resource, string $characters) {
                // Trim all spaces away
                $characters = trim($characters);
 
@@ -166,7 +166,5 @@ class XmlRequestNodeListTemplateEngine extends BaseXmlTemplateEngine implements
                // Pop the last entry
                $this->getStackInstance()->popNamed('node_request_node_list');
        }
-}
 
-// [EOF]
-?>
+}
index e1e21925846dc32ef2aa44ae7a378775825fb853..bccfb49882875c451dcf5f7dbb99b206ddc2cef6 100644 (file)
@@ -790,18 +790,6 @@ $cfg->setConfigEntry('tcp_socket_accept_wait_usec', 0);
 // CFG: NODE-STATE-CHECKED-PACKAGE-CLASS
 $cfg->setConfigEntry('node_state_checked_package_class', 'NewConnectionNodeState');
 
-// CFG: NODE-ID
-$cfg->setConfigEntry('node_id', '');
-
-// CFG: SESSION-ID
-$cfg->setConfigEntry('session_id', '');
-
-// CFG: PRIVATE-KEY
-$cfg->setConfigEntry('private_key', '');
-
-// CFG: PRIVATE-KEY-HASH
-$cfg->setConfigEntry('private_key_hash', '');
-
 // CFG: EXTERNAL-ADDRESS
 $cfg->setConfigEntry('external_address', '');
 
index d531a43a306657e6fbc1083b001787dddfd8bed9..ceb19add6524bb42e91e3497b42d2df7afb03162 100644 (file)
@@ -69,6 +69,6 @@ interface HandleableProtocol extends Handleable, HubInterface {
         * @param       $unl            UNL to test
         * @return      $ifMatches      Whether the found UNL matches own addresss
         */
-       function isOwnAddress ($unl);
+       function isOwnAddress (string $unl);
 
 }
diff --git a/core b/core
index 90f442d88f7876a27ff75452e0ed1708b7dbc198..74b4f2c1770c622cbdbb1f84ac27771da18a0427 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 90f442d88f7876a27ff75452e0ed1708b7dbc198
+Subproject commit 74b4f2c1770c622cbdbb1f84ac27771da18a0427