class Pipeline implements Pipeline

Properties

protected Container $container

The container implementation.

protected mixed $passable

The object being passed through the pipeline.

protected array $pipes

The array of class pipes.

protected string $method

The method to call on each pipe.

Methods

void
__construct(Container $container = null)

Create a new class instance.

$this
send(mixed $passable)

Set the object being sent through the pipeline.

$this
through(array|mixed $pipes)

Set the array of pipes.

$this
via(string $method)

Set the method to call on the pipes.

mixed
then(Closure $destination)

Run the pipeline with a final destination callback.

prepareDestination(Closure $destination)

Get the final piece of the Closure onion.

carry()

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

array
parsePipeString(string $pipe)

Parse full pipe string to get name and parameters.

getContainer()

Get the container instance.

Details

at line 46
void __construct(Container $container = null)

Create a new class instance.

Parameters

Container $container

Return Value

void

at line 57
$this send(mixed $passable)

Set the object being sent through the pipeline.

Parameters

mixed $passable

Return Value

$this

at line 70
$this through(array|mixed $pipes)

Set the array of pipes.

Parameters

array|mixed $pipes

Return Value

$this

at line 83
$this via(string $method)

Set the method to call on the pipes.

Parameters

string $method

Return Value

$this

at line 96
mixed then(Closure $destination)

Run the pipeline with a final destination callback.

Parameters

Closure $destination

Return Value

mixed

at line 111
protected Closure prepareDestination(Closure $destination)

Get the final piece of the Closure onion.

Parameters

Closure $destination

Return Value

Closure

at line 123
protected Closure carry()

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

Return Value

Closure

at line 159
protected array parsePipeString(string $pipe)

Parse full pipe string to get name and parameters.

Parameters

string $pipe

Return Value

array

at line 176
protected Container getContainer()

Get the container instance.

Return Value

Container

Exceptions

RuntimeException