]> git.mxchange.org Git - hub.git/commitdiff
Added nodeInstance parameter (NodeHelper interface) to all loadDescriptorXml() method...
authorRoland Häder <roland@mxchange.org>
Sun, 26 Aug 2012 20:11:47 +0000 (20:11 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Aug 2012 20:11:47 +0000 (20:11 +0000)
Doxyfile
application/hub/interfaces/helper/hub/class_HelpableHub.php
application/hub/main/handler/class_BaseDataHandler.php
application/hub/main/helper/hub/announcement/class_HubAnnouncementHelper.php
application/hub/main/helper/hub/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php
application/hub/main/helper/hub/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php
application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php
application/hub/main/helper/hub/requests/class_NodeRequestNodeListHelper.php
application/hub/main/nodes/class_BaseHubNode.php

index d6b467765be4fa1369980094d69b25af887a983f..037d9291f7707a033a0c9c435b335b2c62f2525e 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING      = UTF-8
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
-PROJECT_NAME           = GenericObjectSharingHub
+PROJECT_NAME           = "Generic Object Sharing Hub"
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number.
 # This could be handy for archiving the generated documentation or
index 7b5747555197d46a7b7608caa2f1ae09266d68f8..5c611a984e8752b80da0ed2d49682f29b7dac12f 100644 (file)
@@ -25,9 +25,10 @@ interface HelpableHub extends Helper {
        /**
         * Loads the descriptor XML file
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       function loadDescriptorXml ();
+       function loadDescriptorXml (NodeHelper $nodeInstance);
 
        /**
         * Send a package out
index 8fd0b4163b352b1c6ff1a6fc567f6c0603d84442..c7575d684b0b4e582c2a295aab70c830508cdb5a 100644 (file)
@@ -92,8 +92,11 @@ abstract class BaseDataHandler extends BaseHandler {
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_answer_' . $this->getHandlerName() . '_helper_class', array($messageData));
 
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
                // Load descriptor XML
-               $helperInstance->loadDescriptorXml();
+               $helperInstance->loadDescriptorXml($nodeInstance);
 
                /*
                 * Set missing (temporary) configuration data, mostly it needs to be
@@ -104,9 +107,6 @@ abstract class BaseDataHandler extends BaseHandler {
                // Compile any configuration variables
                $helperInstance->getTemplateInstance()->compileConfigInVariables();
 
-               // Get node instance
-               $nodeInstance = Registry::getRegistry()->getInstance('node');
-
                // Deliver the package
                $helperInstance->sendPackage($nodeInstance);
 
@@ -133,8 +133,11 @@ abstract class BaseDataHandler extends BaseHandler {
                // Get a helper instance based on this handler's name
                $helperInstance = ObjectFactory::createObjectByConfiguredName('node_next_' . $this->getHandlerName() . '_helper_class', array($messageData));
 
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
                // Load descriptor XML
-               $helperInstance->loadDescriptorXml();
+               $helperInstance->loadDescriptorXml($nodeInstance);
 
                /*
                 * Set missing (temporary) configuration data, mostly it needs to be
@@ -145,9 +148,6 @@ abstract class BaseDataHandler extends BaseHandler {
                // Compile any configuration variables
                $helperInstance->getTemplateInstance()->compileConfigInVariables();
 
-               // Get node instance
-               $nodeInstance = Registry::getRegistry()->getInstance('node');
-
                // Deliver the package
                $helperInstance->sendPackage($nodeInstance);
 
index 6e576867312107268a0432e35c6fb6972fbff5b7..84f14e0f6eb2c4bb39108eab64db3513138d6c87 100644 (file)
@@ -55,9 +55,10 @@ class HubAnnouncementHelper extends BaseHubHelper implements HelpableHub {
        /**
         * Loads the announcement descriptor for parsing
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       public function loadDescriptorXml () {
+       public function loadDescriptorXml (NodeHelper $nodeInstance) {
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Starting with announcement to upper hubs...');
 
index abd7e024d14483ad33109aa9aafcc6b78acada03..0fdb1918c2b1a4dcdf6f3c732c77095fd4277aae 100644 (file)
@@ -59,9 +59,10 @@ class NodeAnnouncementMessageAnswerHelper extends BaseHubAnswerHelper implements
        /**
         * Loads the descriptor XML file
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       public function loadDescriptorXml () {
+       public function loadDescriptorXml (NodeHelper $nodeInstance) {
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer an announcement...');
 
index ba3104c70b62fe7841433328069fa25e62fdad3c..30cc9cf84f5194f491ca7961173c00490aa521d6 100644 (file)
@@ -59,9 +59,10 @@ class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper impleme
        /**
         * Loads the descriptor XML file
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       public function loadDescriptorXml () {
+       public function loadDescriptorXml (NodeHelper $nodeInstance) {
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to answer a request: node-list...');
 
index 2a6c37cd561a426127eb2e2cf21837833adf208c..255afe5c6352536768f7313d74e6892e2f4dc045 100644 (file)
@@ -55,9 +55,10 @@ class HubSelfConnectHelper extends BaseHubHelper implements HelpableHub {
        /**
         * Loads the descriptor XML file
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       public function loadDescriptorXml () {
+       public function loadDescriptorXml (NodeHelper $nodeInstance) {
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting self-connect...');
 
index 8133f99628de34247457d38c070e272c022c5853..3fea83238b5b8bdafaa39c7ed86286e5d8141dd0 100644 (file)
@@ -55,9 +55,10 @@ class NodeRequestNodeListHelper extends BaseHubHelper implements HelpableHub {
        /**
         * Loads the descriptor XML file
         *
+        * @param       $nodeInstance   An instance of a NodeHelper class
         * @return      void
         */
-       public function loadDescriptorXml () {
+       public function loadDescriptorXml (NodeHelper $nodeInstance) {
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput('HELPER: Attempting to request node list...');
 
index b596da7f01c134f8de45660fd59359faa973ad9e..d1f251a7a5fbe07779daa3ec5a195a68cc966c14 100644 (file)
@@ -501,7 +501,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $helperInstance = ObjectFactory::createObjectByConfiguredName('hub_announcement_helper_class');
 
                // Load the announcement descriptor
-               $helperInstance->loadDescriptorXml();
+               $helperInstance->loadDescriptorXml($this);
 
                // Compile all variables
                $helperInstance->getTemplateInstance()->compileConfigInVariables();
@@ -532,7 +532,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $helperInstance = ObjectFactory::createObjectByConfiguredName('hub_self_connect_helper_class', array($this));
 
                // Load the descriptor (XML) file
-               $helperInstance->loadDescriptorXml();
+               $helperInstance->loadDescriptorXml($this);
 
                // Compile all variables
                $helperInstance->getTemplateInstance()->compileConfigInVariables();