/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)');
} else {
// Debug message
- //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('packageContent=' . print_r($packageContent,true) . ',chunks='.print_r($chunks,true));
-
- /*
- * "explode" the string from 'raw_data' with chunk separator to
- * get an array of chunks. These chunks must then be verified by
- * their checksums. Also the final chunk must be handled.
- */
- $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
-
- // Now get a chunk handler instance
- $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
-
- // Add all chunks because the last final chunk is found
- $handlerInstance->addAllChunksWithFinal($chunks);
+ /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('packageContent=' . print_r($packageContent,true) . ',chunks='.print_r($chunks,true));
}
}
// Debug message
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.');
- // Call the real handler method
- $this->handlePackageByUnhandledPackage($packageContent);
+ /*
+ * "explode" the string from 'raw_data' with chunk separator to
+ * get an array of chunks. These chunks must then be verified by
+ * their checksums. Also the final chunk must be handled.
+ */
+ $chunks = explode(PackageFragmenter::CHUNK_SEPARATOR, $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]);
+
+ // Now get a chunk handler instance
+ $handlerInstance = ChunkHandlerFactory::createChunkHandlerInstance();
+
+ // Add all chunks because the last final chunk is found
+ $handlerInstance->addAllChunksWithFinal($chunks);
}
}