* @return void
*/
private function extractTagsFromPackageData (array $packageData) {
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TAGS[' . __METHOD__ . ':' . __LINE__ . ']: packageData=' . print_r($packageData, TRUE));
+
/*
* We take a look at the tags (in most cases only one is needed) so
* first we need the content data splitted up into all it's parts.
* shared over the whole hub-network. So if the "tag" (let's better say
* object type) isn't found in that XML the package won't be distributed.
*
+ * @param $packageData Raw package data
* @return void
* @throws InvalidTagException If a provided tag from the package data is invalid
*/
- private function verifyAllTags () {
+ private function verifyAllTags (array $packageData) {
// Get the registry
$objectRegistryInstance = ObjectTypeRegistryFactory::createObjectTypeRegistryInstance();
} // END - if
// Now save the last discovered protocol/recipient type
- $this->lastProtocol = ProtocolHandlerFactory::createProtocolHandlerFromArray($entry);
+ $this->lastProtocol = ProtocolHandlerFactory::createProtocolHandlerFromPackageData($packageData);
$this->lastRecipientType = $entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_RECIPIENT_TYPE];
} // END - foreach
}
* Chooses the right protocol from given package data
*
* @param $packageData Raw package data
- * @return $lastProtocol An instance of the last used ProtocolHandler class
+ * @return $lastProtocol An instance of the last used HandleableProtocol class
*/
public function chooseProtocolFromPackageData (array $packageData) {
// Extract the tags
$this->extractTagsFromPackageData($packageData);
// Now we need to verify every single tag
- $this->verifyAllTags();
+ $this->verifyAllTags($packageData);
// Return the last (and only) found protocol (e.g. 'tcp' is very usual)
return $this->lastProtocol;
$this->extractTagsFromPackageData($packageData);
// Now we need to verify every single tag
- $this->verifyAllTags();
+ $this->verifyAllTags($packageData);
// Now simply check it out
$accepts = (($this->lastRecipientType == $listenerInstance->getListenerType()) && ($listenerInstance->getListenerType() != 'invalid'));