X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fhub%2Fmain%2Fnodes%2Fclass_BaseHubNode.php;h=39190abd2d12e6d23aba3fc8cf6315b307adc798;hb=38097bd02cea3bcc8acdfa0e4ffecf376c9f5ead;hp=a1b6ef181d4f3de74d1579827dc2afb731d8fce1;hpb=822be9f157e6a46cffc52bbdcc274bca38df1b72;p=hub.git diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index a1b6ef181..39190abd2 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -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]