From 4079d3bf6f53bca012fab8c1f7d6bbd9dda32fc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 4 Aug 2012 23:42:35 +0000 Subject: [PATCH] Now the package assembler is deocoding the finished stream --- .../main/package/assembler/class_PackageAssembler.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5