]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/decoder/package/class_PackageDecoder.php
Continued:
[hub.git] / application / hub / main / decoder / package / class_PackageDecoder.php
index 759fed315615f3cc5b155d62ffd0dd0c650767e5..ce9a11a13bc3659eeeaf31f7e40594be9df5a41a 100644 (file)
@@ -48,7 +48,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
                $decoderInstance = new PackageDecoder();
 
                // Init stacker for received packages
-               $handlerInstance->getStackerInstance()->initStack(self::STACKER_NAME_DECODED_PACKAGE);
+               $handlerInstance->getStackInstance()->initStack(self::STACKER_NAME_DECODED_PACKAGE);
 
                // Set the handler instance here
                $decoderInstance->setHandlerInstance($handlerInstance);
@@ -70,7 +70,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
         */
        public function ifUnhandledRawPackageDataLeft () {
                // Check it
-               $unhandledDataLeft = (!$this->getHandlerInstance()->getStackerInstance()->isStackEmpty(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA));
+               $unhandledDataLeft = (!$this->getHandlerInstance()->getStackInstance()->isStackEmpty(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA));
 
                // Return it
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-DECODER[' . __METHOD__ . ':' . __LINE__ . ']: unhandledDataLeft=' . intval($unhandledDataLeft));
@@ -87,7 +87,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
                assert($this->ifUnhandledRawPackageDataLeft());
 
                // "Pop" the next raw package content
-               $rawPackageContent = $this->getHandlerInstance()->getStackerInstance()->popNamed(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA);
+               $rawPackageContent = $this->getHandlerInstance()->getStackInstance()->popNamed(ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-DECODER[' . __METHOD__ . ':' . __LINE__ . ']: Got ' . strlen($rawPackageContent) . ' bytes from stack ' . ChunkHandler::STACKER_NAME_ASSEMBLED_RAW_DATA . ', decoding it ...');
@@ -117,7 +117,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
                if ($discoveryInstance->isRecipientListEmpty()) {
                        // The recipient is this node so next stack it on 'decoded_package'
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-DECODER[' . __METHOD__ . ':' . __LINE__ . ']: Pushing ' . strlen($decodedData) . ' bytes to stack ' . self::STACKER_NAME_DECODED_PACKAGE . ' ...');
-                       $this->getHandlerInstance()->getStackerInstance()->pushNamed(self::STACKER_NAME_DECODED_PACKAGE, $decodedData);
+                       $this->getHandlerInstance()->getStackInstance()->pushNamed(self::STACKER_NAME_DECODED_PACKAGE, $decodedData);
                } else {
                        // Forward the package to the next node
                        $this->getPackageInstance()->forwardRawPackage($decodedData);
@@ -131,7 +131,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
         */
        public function ifDeocedPackagesLeft () {
                // Check it ...
-               $ifRawPackagesLeft = (!$this->getHandlerInstance()->getStackerInstance()->isStackEmpty(self::STACKER_NAME_DECODED_PACKAGE));
+               $ifRawPackagesLeft = (!$this->getHandlerInstance()->getStackInstance()->isStackEmpty(self::STACKER_NAME_DECODED_PACKAGE));
 
                // ... return it
                return $ifRawPackagesLeft;
@@ -147,7 +147,7 @@ class PackageDecoder extends BaseDecoder implements Decodeable {
                assert($this->ifDeocedPackagesLeft());
 
                // Get the next entry (assoziative array)
-               $decodedData = $this->getHandlerInstance()->getStackerInstance()->popNamed(self::STACKER_NAME_DECODED_PACKAGE);
+               $decodedData = $this->getHandlerInstance()->getStackInstance()->popNamed(self::STACKER_NAME_DECODED_PACKAGE);
 
                // Handle it
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-DECODER[' . __METHOD__ . ':' . __LINE__ . ']: decodedData(' . count($decodedData) . ')=' . print_r($decodedData, TRUE));