BatchProcessDto
The argument BatchAbstract::processAction() receives. Extends ProcessDto with methods for emitting downstream items and managing the pagination cursor.
use Hanaboso\PipesPhpSdk\Utils\Process\BatchProcessDto;
Inheritance #
ProcessDtoAbstract -> ProcessDto -> BatchProcessDto
Methods added #
| Method | Returns | Purpose |
|---|---|---|
addItem($payload) | self | Emit one downstream message. |
addItemFromArray(array $payload) | self | Same, typed for arrays. |
setItemList(array $items) | self | Shred the array: each element becomes one downstream message. |
setItemList(array $items, true) | self | Wrap as a single message instead. |
getBatchCursor() | ?string | Cursor value the platform passed in for the next iteration. |
setBatchCursor(string $cursor) | self | Iterate again. Items already emitted flow downstream immediately. |
setBatchCursor(string $cursor, true) | self | Iterate again, hold items until the iteration completes. |
See also #
- BatchAbstract
- Development: Patterns / Pagination and batch
- Node.js equivalent:
BatchProcessDto