From: Roland Häder Date: Sat, 4 Aug 2012 23:42:35 +0000 (+0000) Subject: Now the package assembler is deocoding the finished stream X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4079d3bf6f53bca012fab8c1f7d6bbd9dda32fc4;p=hub.git Now the package assembler is deocoding the finished stream --- diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index ab4d468db..94746ba63 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -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