Pipeline
class Pipeline extends Pipeline (View source)
This extended pipeline catches any exceptions that occur during each slice.
The exceptions are converted to HTTP responses for proper middleware handling.
Traits
Properties
protected Container|null | $container | The container implementation. |
from Pipeline |
protected mixed | $passable | The object being passed through the pipeline. |
from Pipeline |
protected array | $pipes | The array of class pipes. |
from Pipeline |
protected string | $method | The method to call on each pipe. |
from Pipeline |
protected Closure|null | $finally | The final callback to be executed after the pipeline ends regardless of the outcome. |
from Pipeline |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Set a final callback to be executed after the pipeline ends regardless of the outcome.
Parse full pipe string to get name and parameters.
Handles the value returned from each pipe before passing it to the next.
Details
$this|TWhenReturnType
when($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
$this|TUnlessReturnType
unless($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
$this
finally(Closure $callback)
Set a final callback to be executed after the pipeline ends regardless of the outcome.
protected Closure
prepareDestination(Closure $destination)
Get the final piece of the Closure onion.
protected mixed
handleCarry(mixed $carry)
Handles the value returned from each pipe before passing it to the next.