class PendingChain

Traits

Properties

string|null $connection

The name of the connection the chain should be sent to.

string|null $queue

The name of the queue the chain should be sent to.

DateInterval|DateTimeInterface|int|null $delay

The number of seconds before the chain should be made available.

array $catchCallbacks

The callbacks to be executed on failure.

Methods

mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

__construct(mixed $job, array $chain)

Create a new PendingChain instance.

onConnection(UnitEnum|string|null $connection)

Set the desired connection for the job.

onQueue(UnitEnum|string|null $queue)

Set the desired queue for the job.

prepend(mixed $job)

Prepend a job to the chain.

append(mixed $job)

Append a job to the chain.

delay(DateInterval|DateTimeInterface|int|null $delay)

Set the desired delay in seconds for the chain.

catch(callable $callback)

Add a callback to be executed on job failure.

array
catchCallbacks()

Get the "catch" callbacks that have been registered.

mixed
dispatch(mixed ...$arguments)

Dispatch the job chain.

mixed
dispatchIf(bool|Closure $boolean)

Dispatch the job chain if the given truth test passes.

mixed
dispatchUnless(bool|Closure $boolean)

Dispatch the job chain unless the given truth test passes.

Details

in Conditionable at line 23
mixed when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

in Conditionable at line 56
mixed unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

at line 52
__construct(mixed $job, array $chain)

Create a new PendingChain instance.

Parameters

mixed $job

the class name of the job being dispatched

array $chain

the jobs to be chained

at line 61
PendingChain onConnection(UnitEnum|string|null $connection)

Set the desired connection for the job.

Parameters

UnitEnum|string|null $connection

Return Value

PendingChain

at line 73
PendingChain onQueue(UnitEnum|string|null $queue)

Set the desired queue for the job.

Parameters

UnitEnum|string|null $queue

Return Value

PendingChain

at line 85
PendingChain prepend(mixed $job)

Prepend a job to the chain.

Parameters

mixed $job

Return Value

PendingChain

at line 105
PendingChain append(mixed $job)

Append a job to the chain.

Parameters

mixed $job

Return Value

PendingChain

at line 123
PendingChain delay(DateInterval|DateTimeInterface|int|null $delay)

Set the desired delay in seconds for the chain.

Parameters

DateInterval|DateTimeInterface|int|null $delay

Return Value

PendingChain

at line 133
PendingChain catch(callable $callback)

Add a callback to be executed on job failure.

Parameters

callable $callback

Return Value

PendingChain

at line 145
array catchCallbacks()

Get the "catch" callbacks that have been registered.

Return Value

array

at line 153
mixed dispatch(mixed ...$arguments)

Dispatch the job chain.

Parameters

mixed ...$arguments

Return Value

mixed

at line 192
mixed dispatchIf(bool|Closure $boolean)

Dispatch the job chain if the given truth test passes.

Parameters

bool|Closure $boolean

Return Value

mixed

at line 200
mixed dispatchUnless(bool|Closure $boolean)

Dispatch the job chain unless the given truth test passes.

Parameters

bool|Closure $boolean

Return Value

mixed