]> git.mxchange.org Git - hub.git/commitdiff
Now the package assembler is deocoding the finished stream
authorRoland Häder <roland@mxchange.org>
Sat, 4 Aug 2012 23:42:35 +0000 (23:42 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 4 Aug 2012 23:42:35 +0000 (23:42 +0000)
application/hub/main/package/assembler/class_PackageAssembler.php

index ab4d468dbdaf1f36da20e8110281ab91e819f21d..94746ba6395116793d034a177b723fa558b1d5bf 100644 (file)
@@ -51,6 +51,12 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable
                // Set package instance here
                $assemblerInstance->setPackageInstance($packageInstance);
 
+               // Create an instance of a raw data input stream
+               $streamInstance = ObjectFactory::createObjectByConfiguredName('node_raw_data_input_stream_class');
+
+               // And set it
+               $assemblerInstance->setInputStreamInstance($streamInstance);
+
                // Return the prepared instance
                return $assemblerInstance;
        }
@@ -188,8 +194,8 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable
 
                // Init fake array
                $packageContent = array(
-                       BaseRawDataHandler::PACKAGE_RAW_DATA => $this->pendingData,
-                       BaseRawDataHandler::PACKAGE_ERROR_CODE   => BaseRawDataHandler::SOCKET_ERROR_UNHANDLED
+                       BaseRawDataHandler::PACKAGE_RAW_DATA   => $this->getInputStreamInstance()->streamData($this->pendingData),
+                       BaseRawDataHandler::PACKAGE_ERROR_CODE => BaseRawDataHandler::SOCKET_ERROR_UNHANDLED
                );
 
                // Clear pending data