class Stop

Properties

protected SerializableClosure|bool $condition

The stop condition, wrapped when it is a closure so queued agents and listeners can serialize the middleware.

Methods

__construct(Closure|bool $condition)

Create a new stop middleware instance.

static Stop
when(Closure|bool $condition)

Stop the run before any step for which the given condition holds.

static Stop
unless(Closure|bool $condition)

Stop the run before any step for which the given condition fails.

handle(PendingStep $step, Closure $next)

Handle the pending step.

Details

at line 24
__construct(Closure|bool $condition)

Create a new stop middleware instance.

Parameters

Closure|bool $condition

at line 34
static Stop when(Closure|bool $condition)

Stop the run before any step for which the given condition holds.

Parameters

Closure|bool $condition

Return Value

Stop

at line 44
static Stop unless(Closure|bool $condition)

Stop the run before any step for which the given condition fails.

Parameters

Closure|bool $condition

Return Value

Stop

at line 54
StepResult handle(PendingStep $step, Closure $next)

Handle the pending step.

Parameters

PendingStep $step
Closure $next

Return Value

StepResult