PendingClosureDispatch
class PendingClosureDispatch extends PendingDispatch
Traits
Properties
| protected bool | $afterResponse | Indicates if the job should be dispatched immediately after sending the response. |
from PendingDispatch |
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.
Get a configuration value from an attribute, falling back to a property.
Extract the value from an attribute instance.
Get an instance of the given attribute class from the target class or its parents.
Determine if a property declared on a child class overrides an inherited attribute.
Set the desired connection for the job.
Set the desired queue for the job.
Set the desired job message group.
Set the desired job deduplicator callback.
Set the desired connection for the chain.
Set the desired queue for the chain.
Indicate that the job should be dispatched after the open parent database transactions have committed.
Indicate that the job should not wait until database transactions have been committed before dispatching.
Dispatch the job without the transactional outbox.
Stage the job on the given database connection.
Set the jobs that should run if this job is successful.
Indicate that the job should be dispatched after the response is sent to the browser.
Acquire a debounce lock for the job and set its delay.
Dynamically proxy methods to the underlying job.
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.
in
ReadsClassAttributes at line 17
protected mixed
getAttributeValue(object $target, string $attributeClass, string|null $property = null, mixed $default = null)
Get a configuration value from an attribute, falling back to a property.
in
ReadsClassAttributes at line 46
protected mixed
extractAttributeValue(object $instance)
Extract the value from an attribute instance.
in
ReadsClassAttributes at line 58
protected object|null
getAttributeInstance(object $target, string $attributeClass, ReflectionClass|null $declaringClass = null)
Get an instance of the given attribute class from the target class or its parents.
in
ReadsClassAttributes at line 74
protected bool
propertyOverridesAttribute(object $target, ReflectionClass $reflection, string|null $property, ReflectionClass $attributeDeclaringClass)
Determine if a property declared on a child class overrides an inherited attribute.
in
PendingDispatch at line 38
__construct(mixed $job)
Create a new pending job dispatch.
in
PendingDispatch at line 48
PendingDispatch
onConnection(UnitEnum|string|null $connection)
Set the desired connection for the job.
in
PendingDispatch at line 60
PendingDispatch
onQueue(UnitEnum|string|null $queue)
Set the desired queue for the job.
in
PendingDispatch at line 74
PendingDispatch
onGroup(array|UnitEnum|string|int|null $group)
Set the desired job message group.
This feature is only supported by some queues, such as Amazon SQS.
in
PendingDispatch at line 90
PendingDispatch
withDeduplicator(array|callable|null $deduplicator)
Set the desired job deduplicator callback.
This feature is only supported by some queues, such as Amazon SQS FIFO.
in
PendingDispatch at line 102
PendingDispatch
allOnConnection(UnitEnum|string|null $connection)
Set the desired connection for the chain.
in
PendingDispatch at line 114
PendingDispatch
allOnQueue(UnitEnum|string|null $queue)
Set the desired queue for the chain.
in
PendingDispatch at line 126
PendingDispatch
delay(DateInterval|DateTimeInterface|int|null $delay)
Set the desired delay in seconds for the job.
in
PendingDispatch at line 138
PendingDispatch
withoutDelay()
Set the delay for the job to zero seconds.
in
PendingDispatch at line 150
PendingDispatch
afterCommit()
Indicate that the job should be dispatched after the open parent database transactions have committed.
in
PendingDispatch at line 162
PendingDispatch
beforeCommit()
Indicate that the job should not wait until database transactions have been committed before dispatching.
in
PendingDispatch at line 174
PendingDispatch
viaOutbox()
Dispatch the job through the transactional outbox.
in
PendingDispatch at line 186
PendingDispatch
withoutOutbox()
Dispatch the job without the transactional outbox.
in
PendingDispatch at line 198
PendingDispatch
onOutboxDatabase(UnitEnum|string $connection)
Stage the job on the given database connection.
in
PendingDispatch at line 210
PendingDispatch
chain(array $chain)
Set the jobs that should run if this job is successful.
in
PendingDispatch at line 222
PendingDispatch
afterResponse(bool $afterResponse = true)
Indicate that the job should be dispatched after the response is sent to the browser.
in
PendingDispatch at line 232
mixed
getJob()
Get the underlying job instance.
in
PendingDispatch at line 240
protected bool
shouldDispatch()
Determine if the job should be dispatched.
in
PendingDispatch at line 279
protected void
acquireDebounceLock()
Acquire a debounce lock for the job and set its delay.
in
PendingDispatch at line 301
PendingDispatch
__call(string $method, array $parameters)
Dynamically proxy methods to the underlying job.
in
PendingDispatch at line 311
__destruct()
Handle the object's destruction.
at line 16
PendingClosureDispatch
catch(Closure $callback)
Add a callback to be executed if the job fails.