PendingChain
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
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a new PendingChain instance.
Set the desired connection for the job.
Set the desired queue for the job.
Prepend a job to the chain.
Append a job to the chain.
Set the desired delay in seconds for the chain.
Add a callback to be executed on job failure.
Get the "catch" callbacks that have been registered.
Dispatch the job chain.
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.
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.
at line 52
__construct(mixed $job, array $chain)
Create a new PendingChain instance.
at line 61
PendingChain
onConnection(UnitEnum|string|null $connection)
Set the desired connection for the job.
at line 73
PendingChain
onQueue(UnitEnum|string|null $queue)
Set the desired queue for the job.
at line 85
PendingChain
prepend(mixed $job)
Prepend a job to the chain.
at line 105
PendingChain
append(mixed $job)
Append a job to the chain.
at line 123
PendingChain
delay(DateInterval|DateTimeInterface|int|null $delay)
Set the desired delay in seconds for the chain.
at line 133
PendingChain
catch(callable $callback)
Add a callback to be executed on job failure.
at line 145
array
catchCallbacks()
Get the "catch" callbacks that have been registered.
at line 153
mixed
dispatch(mixed ...$arguments)
Dispatch the job chain.
at line 192
mixed
dispatchIf(bool|Closure $boolean)
Dispatch the job chain if the given truth test passes.
at line 200
mixed
dispatchUnless(bool|Closure $boolean)
Dispatch the job chain unless the given truth test passes.