Pipeline
- Full name:
\Codefy\Framework\Pipeline\Pipeline - This class is marked as final and can't be subclassed
- This class implements:
\Codefy\Framework\Pipeline\Chainable - This class is a Final class
Properties
passable
The object being passed through the pipeline.
onFailure
The callback to be executed on failure pipeline.
pipes
The array of class pipes.
method
The method to call on each pipe.
finally
The final callback to be executed after the pipeline ends regardless of the outcome.
container
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$container | \Qubus\Injector\ServiceContainer |
send
Set the object being sent through the pipeline.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$passable | mixed |
through
Set the array of pipes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pipes | mixed |
pipe
Push additional pipes onto the pipeline.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pipe | callable |
via
Set the method to call on the pipes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$method | string |
then
Run the pipeline with a final destination callback.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$destination | \Closure |
Throws:
thenReturn
Run the pipeline and return the result.
Throws:
finally
Set a final callback to be executed after the pipeline ends regardless of the outcome.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$callback | \Closure |
prepareDestination
Get the final piece of the Closure onion.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$destination | \Closure |
carry
Get a Closure that represents a slice of the application onion.
getContainer
Get the container instance.
onFailure
Set callback to be executed on failure pipeline.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$callback | \Closure |
run
Run a single pipe.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pipe | string | |
$data | mixed |
parsePipeString
Parse full pipe string to get name and parameters.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$pipe | string |
pipes
Get the array of configured pipes.
handleCarry
Handle the value returned from each pipe before passing it to the next.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$carry | mixed |
handleException
Handle the given exception.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$passable | mixed | |
$e | \Throwable |
Throws:
Inherited methods
withTransaction
Enable transaction in pipeline.
beginTransaction
Begin the transaction if enabled.
Throws:
commitTransaction
Commit the transaction if enabled.
Throws:
rollbackTransaction
Rollback the transaction if enabled.
Throws:
Automatically generated on 2025-10-13