]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 15:13:26 +0000 (16:13 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Oct 2020 15:15:38 +0000 (16:15 +0100)
- recipientId is the proper one
- also commented out

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/handler/package/class_NetworkPackageHandler.php
application/hub/classes/package/deliverable/class_PackageData.php
application/hub/classes/tags/package/class_PackageTags.php

index 770107d9b588635e756a64a96b8c5e2d36cbd368..1a495ee3a148968e4229aab14dca6a48ee40f6d2 100644 (file)
@@ -1363,12 +1363,9 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                /* 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');
@@ -1376,7 +1373,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei
                // 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]);
index c848eb38dca82d1e31eb4bfd1267b47dc7d46e49..0dcbb84fd92a9e3499c244f3388f7ec242288157 100644 (file)
@@ -66,6 +66,11 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera
         */
        private $recipientType;
 
+       /**
+        * Recipient id
+        */
+       private $recipientId;
+
        /**
         * Recipient UNL
         */
@@ -209,6 +214,25 @@ class PackageData extends BaseHubSystem implements DeliverablePackage, Registera
                $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
         *
index b348edfaf786cb8066a191681ae23df00504b059..2bc5ba9a99f1da0341c8f4306d368e445ca06a15 100644 (file)
@@ -124,7 +124,7 @@ class PackageTags extends BaseTag implements Tagable {
                $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]));
        }
 
@@ -156,7 +156,7 @@ class PackageTags extends BaseTag implements Tagable {
                         * 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);