Documentation

Pipeline extends Pipeline
in package

This extended pipeline catches any exceptions that occur during each slice.

The exceptions are converted to HTTP responses for proper middleware handling.

Table of Contents

$container  : Container
The container implementation.
$method  : string
The method to call on each pipe.
$passable  : mixed
The object being passed through the pipeline.
$pipes  : array<string|int, mixed>
The array of class pipes.
__construct()  : void
Create a new class instance.
send()  : $this
Set the object being sent through the pipeline.
then()  : mixed
Run the pipeline with a final destination callback.
through()  : $this
Set the array of pipes.
via()  : $this
Set the method to call on the pipes.
carry()  : Closure
Get a Closure that represents a slice of the application onion.
getContainer()  : Container
Get the container instance.
handleException()  : mixed
Handle the given exception.
parsePipeString()  : array<string|int, mixed>
Parse full pipe string to get name and parameters.
prepareDestination()  : Closure
Get the final piece of the Closure onion.

Properties

$method

The method to call on each pipe.

protected string $method = 'handle'

$passable

The object being passed through the pipeline.

protected mixed $passable

$pipes

The array of class pipes.

protected array<string|int, mixed> $pipes = []

Methods

__construct()

Create a new class instance.

public __construct([Container|null $container = null ]) : void
Parameters
$container : Container|null = null
Return values
void

send()

Set the object being sent through the pipeline.

public send(mixed $passable) : $this
Parameters
$passable : mixed
Return values
$this

then()

Run the pipeline with a final destination callback.

public then(Closure $destination) : mixed
Parameters
$destination : Closure
Return values
mixed

through()

Set the array of pipes.

public through(array<string|int, mixed>|mixed $pipes) : $this
Parameters
$pipes : array<string|int, mixed>|mixed
Return values
$this

via()

Set the method to call on the pipes.

public via(string $method) : $this
Parameters
$method : string
Return values
$this

carry()

Get a Closure that represents a slice of the application onion.

protected carry() : Closure
Return values
Closure

getContainer()

Get the container instance.

protected getContainer() : Container
Tags
throws
RuntimeException
Return values
Container

handleException()

Handle the given exception.

protected handleException(mixed $passable, Exception $e) : mixed
Parameters
$passable : mixed
$e : Exception
Tags
throws
Exception
Return values
mixed

parsePipeString()

Parse full pipe string to get name and parameters.

protected parsePipeString(string $pipe) : array<string|int, mixed>
Parameters
$pipe : string
Return values
array<string|int, mixed>

prepareDestination()

Get the final piece of the Closure onion.

protected prepareDestination(Closure $destination) : Closure
Parameters
$destination : Closure
Return values
Closure

Search results