/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: rawPackageContent()=%d - CALLED!', strlen($rawPackageContent)));
$decodedArray = explode(self::PACKAGE_DATA_SEPARATOR, $rawPackageContent);
- // Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE-HANDLER: decodedArray=' . print_r($decodedArray, TRUE));
-
// Assert on count (should be always 3)
assert(count($decodedArray) == self::DECODED_DATA_ARRAY_SIZE);
- /* PRINTR-DIE: */ die(sprintf('[%s:%d] decodedArray=%s', __METHOD__, __LINE__, print_r($decodedArray, TRUE)));
+ //* DEBUG-DIE: */ die(sprintf('[%s:%d] decodedArray=%s', __METHOD__, __LINE__, print_r($decodedArray, TRUE)));
// Create package instance
$packageInstance = ObjectFactory::createObjectByConfiguredName('package_data_class');
// Set all data
$packageInstance->setSenderAddress($decodedArray[self::INDEX_PACKAGE_SENDER_ADDRESS]);
$packageInstance->setSenderPort($decodedArray[self::INDEX_PACKAGE_SENDER_PORT]);
- $packageInstance->setRecipient($decodedArray[self::INDEX_PACKAGE_RECIPIENT]);
+ $packageInstance->setRecipientId($decodedArray[self::INDEX_PACKAGE_RECIPIENT]);
$packageInstance->setPackageContent($decodedArray[self::INDEX_PACKAGE_CONTENT]);
$packageInstance->setStatus(self::PACKAGE_STATUS_DECODED);
$packageInstance->setContentHash($decodedArray[self::INDEX_PACKAGE_HASH]);
*/
private $recipientType;
+ /**
+ * Recipient id
+ */
+ private $recipientId;
+
/**
* Recipient UNL
*/
$this->recipientType = $recipientType;
}
+ /**
+ * Getter for recipient id
+ *
+ * @return $recipientId Recipient id
+ */
+ public function getRecipientId () {
+ return $this->recipientId;
+ }
+
+ /**
+ * Setter for recipient id
+ *
+ * @param $recipientId Recipient id
+ * @return void
+ */
+ public function setRecipientId ($recipientId) {
+ $this->recipientId = $recipientId;
+ }
+
/**
* Getter for recipient UNL
*
$contentData = explode(NetworkPackageHandler::PACKAGE_MASK_SEPARATOR, $packageInstance->getPackageContent());
// Get the tags and store them locally
- //* PRINTR-DIE: */ die(sprintf('[%s:%d]: contentData(%d)=%s', __METHOD__, __LINE__, count($contentData), print_r($contentData, TRUE)));
+ //* DEBUG-DIE: */ die(sprintf('[%s:%d]: contentData(%d)=%s', __METHOD__, __LINE__, count($contentData), print_r($contentData, TRUE)));
$this->setTags(explode(NetworkPackageHandler::PACKAGE_TAGS_SEPARATOR, $contentData[NetworkPackageHandler::INDEX_TAGS]));
}
* the entry is invalid.
*/
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TAGS: entry[]=%s', gettype($entry)));
- //* PRINTR-DIE: */ die(sprintf('[%s:%d] entry=%s', __METHOD__, __LINE__, print_r($entry, TRUE)));
+ //* DEBUG-DIE: */ die(sprintf('[%s:%d] entry=%s', __METHOD__, __LINE__, print_r($entry, TRUE)));
if ((!is_array($entry)) || (count($entry) == 0) || (!isset($entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_PROTOCOL])) || (!isset($entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_RECIPIENT_TYPE]))) {
// Invalid entry found
throw new InvalidTagException(array($this, $tag), self::EXCEPTION_INVALID_TAG);