]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/nodes/class_BaseHubNode.php
Introduced new factory for object type registries, added a very simple way to get...
[hub.git] / application / hub / main / nodes / class_BaseHubNode.php
index a1b6ef181d4f3de74d1579827dc2afb731d8fce1..39190abd2d12e6d23aba3fc8cf6315b307adc798 100644 (file)
@@ -33,6 +33,9 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        // Exception constants
        const EXCEPTION_HUB_ALREADY_ANNOUNCED = 0xe00;
 
+       // Other constants
+       const OBJECT_LIST_SEPARATOR = ',';
+
        /**
         * IP/port number of bootstrapping node
         */
@@ -780,6 +783,22 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                // Handle it there
                $handlerInstance->handleAnswerMessageData($messageData, $packageInstance);
        }
+
+       /**
+        * "Getter" for an array of all accepted object types
+        *
+        * @return      $objectList             Array of all accepted object types
+        */
+       public function getListFromAcceptedObjectTypes () {
+               // Get registry instance
+               $objectRegistryInstance = ObjectTypeRegistryFactory::createObjectTypeRegistryInstance();
+
+               // Get all entries
+               $objectList = $objectRegistryInstance->getEntries(XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_NAME);
+
+               // ... and return it
+               return $objectList;
+       }
 }
 
 // [EOF]