* @throws FinalChunkVerificationException If the final chunk does not start with 'EOP:'
*/
function addAllChunksWithFinal (array $chunks);
+
+ /**
+ * Handles available chunks by processing one-by-one (not all together,
+ * this would slow-down the whole application) with the help of an
+ * iterator.
+ *
+ * @return void
+ */
+ function handleAvailableChunks ();
}
// [EOF]
// Return result
return $unhandledChunks;
}
+
+ /**
+ * Handles available chunks by processing one-by-one (not all together,
+ * this would slow-down the whole application) with the help of an
+ * iterator.
+ *
+ * @return void
+ */
+ public function handleAvailableChunks () {
+ // First check if there are undhandled chunks available
+ assert($this->ifUnhandledChunksAvailable());
+
+ // Get an entry from the stacker
+ $chunk = $this->getStackerInstance()->getNamed(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP);
+ die('chunk=' . $chunk . chr(10));
+ }
}
// [EOF]
// Set the recipient
$packageData[self::PACKAGE_DATA_RECIPIENT] = $currentRecipient;
- var_dump($packageData);
// And enqueue it to the writer class
$this->getStackerInstance()->pushNamed(self::STACKER_NAME_DECLARED, $packageData);