PendingChainFake
class PendingChainFake extends PendingChain
Traits
Properties
| string|null | $connection | The name of the connection the chain should be sent to. |
from PendingChain |
| string|null | $queue | The name of the queue the chain should be sent to. |
from PendingChain |
| DateInterval|DateTimeInterface|int|null | $delay | The number of seconds before the chain should be made available. |
from PendingChain |
| array | $catchCallbacks | The callbacks to be executed on failure. |
from PendingChain |
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.
Set the desired connection for the job.
Set the desired queue for the job.
Set the desired delay in seconds for the chain.
Add a callback to be executed on job failure.
Dispatch the job with the given arguments.
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 18
__construct(BusFake $bus, mixed $job, array $chain = [])
Create a new pending chain instance.
in
PendingChain at line 61
PendingChain
onConnection(UnitEnum|string|null $connection)
Set the desired connection for the job.
in
PendingChain at line 73
PendingChain
onQueue(UnitEnum|string|null $queue)
Set the desired queue for the job.
in
PendingChain at line 85
PendingChain
prepend(mixed $job)
Prepend a job to the chain.
in
PendingChain at line 105
PendingChain
append(mixed $job)
Append a job to the chain.
in
PendingChain at line 123
PendingChain
delay(DateInterval|DateTimeInterface|int|null $delay)
Set the desired delay in seconds for the chain.
in
PendingChain at line 133
PendingChain
catch(callable $callback)
Add a callback to be executed on job failure.
in
PendingChain at line 145
array
catchCallbacks()
Get the "catch" callbacks that have been registered.
at line 28
mixed
dispatch(mixed ...$arguments)
Dispatch the job with the given arguments.
in
PendingChain at line 192
mixed
dispatchIf(bool|Closure $boolean)
Dispatch the job chain if the given truth test passes.
in
PendingChain at line 200
mixed
dispatchUnless(bool|Closure $boolean)
Dispatch the job chain unless the given truth test passes.