class Hub implements Hub (View source)

Properties

protected Container|null $container

The container implementation.

protected array $pipelines

All of the available pipelines.

Methods

void
__construct(Container|null $container = null)

Create a new Hub instance.

void
defaults(Closure $callback)

Define the default named pipeline.

void
pipeline(string $name, Closure $callback)

Define a new named pipeline.

mixed
pipe(mixed $object, string|null $pipeline = null)

Send an object through one of the available pipelines.

getContainer()

Get the container instance used by the hub.

$this
setContainer(Container $container)

Set the container instance used by the hub.

Details

void __construct(Container|null $container = null)

Create a new Hub instance.

Parameters

Container|null $container

Return Value

void

void defaults(Closure $callback)

Define the default named pipeline.

Parameters

Closure $callback

Return Value

void

void pipeline(string $name, Closure $callback)

Define a new named pipeline.

Parameters

string $name
Closure $callback

Return Value

void

mixed pipe(mixed $object, string|null $pipeline = null)

Send an object through one of the available pipelines.

Parameters

mixed $object
string|null $pipeline

Return Value

mixed

Container getContainer()

Get the container instance used by the hub.

Return Value

Container

$this setContainer(Container $container)

Set the container instance used by the hub.

Parameters

Container $container

Return Value

$this