+ // No markers set?
+ if (!$this->ifStartEndMarkersSet($this->pendingData)) {
+ // This will cause an assertition in next call, so simply wait for more data
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: Pending data of ' . strlen($this->pendingData) . ' Bytes are incomplete, waiting for more ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER[' . __METHOD__ . ':' . __LINE__ . ']: this->pendingData=' . $this->pendingData);
+ return;
+ } elseif (substr_count($this->pendingData, BaseRawDataHandler::STREAM_START_MARKER) > 1) {
+ /*
+ * Multiple messages found, so split off first message as the input
+ * stream can only handle one message per time.
+ */
+ foreach (explode(BaseRawDataHandler::STREAM_START_MARKER, $this->pendingData) as $message) {
+ // Prepend start marker again as it is needed to decode the message.
+ $message = BaseRawDataHandler::STREAM_START_MARKER . $message;
+
+ // Push it on stack
+ $this->getStackInstance()->pushNamed(self::STACKER_NAME_MULTIPLE_MESSAGE, $message);
+ } // END - foreach
+
+ // Clear pending data
+ $this->clearPendingData();
+
+ // ... and exit here
+ return;
+ }
+