BatchAbstract
Base class for any batch (fan-out) node.
use Hanaboso\PipesPhpSdk\Batch\BatchAbstract;
Implements #
BatchInterface.
Methods you implement #
| Method | Returns | Purpose |
|---|---|---|
getName() | string | Stable internal node identifier. |
processAction(ProcessDto $dto) | ProcessDto | Emit zero or more items via $dto->addItem*(). Optionally set a cursor to be re-invoked. |
Output methods (on BatchProcessDto) #
| Method | Effect |
|---|---|
addItem($payload) | Emit one downstream message. |
addItemFromArray(array $payload) | Same, typed for arrays. |
setItemList(array $items) | Shred the array: each element becomes one downstream message. |
setItemList(array $items, true) | Wrap the array as a single message. |
setBatchCursor(string $cursor) | Iterate again. Items already emitted flow downstream in parallel. |
setBatchCursor(string $cursor, true) | Iterate again, hold items until pagination completes. |
Service tag #
Tag the class as orchesty.batch in services.yaml.