On this page
QueuedClosure
class QueuedClosure (View source)
Properties
Closure | $closure | The underlying Closure. |
|
string|null | $connection | The name of the connection the job should be sent to. |
|
string|null | $queue | The name of the queue the job should be sent to. |
|
DateTimeInterface|DateInterval|int|null | $delay | The number of seconds before the job should be made available. |
|
array | $catchCallbacks | All of the "catch" callbacks for the queued closure. |
Methods
void | __construct(Closure $closure) Create a new queued closure event listener resolver. |
|
$this | onConnection(string|null $connection) Set the desired connection for the job. |
|
$this | onQueue(string|null $queue) Set the desired queue for the job. |
|
$this | delay(DateTimeInterface|DateInterval|int|null $delay) Set the desired delay in seconds for the job. |
|
$this | catch(Closure $closure) Specify a callback that should be invoked if the queued listener job fails. |
|
Closure | resolve() Resolve the actual event listener callback. |
Details
void __construct(Closure $closure)
Create a new queued closure event listener resolver.
$this onConnection(string|null $connection)
Set the desired connection for the job.
$this onQueue(string|null $queue)
Set the desired queue for the job.
$this delay(DateTimeInterface|DateInterval|int|null $delay)
Set the desired delay in seconds for the job.
$this catch(Closure $closure)
Specify a callback that should be invoked if the queued listener job fails.
Closure resolve()
Resolve the actual event listener callback.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Events/QueuedClosure.html