QueueRoutes
class QueueRoutes
Properties
| protected array<class-string, array{null|string, null|string}|string> | $routes | The mapping of class names to their default routes. |
Methods
string|null
getConnection(object $queueable)
Get the queue connection that a given queueable instance should be routed to.
string|null
getQueue(object $queueable)
Get the queue that a given queueable instance should be routed to.
array|string|null
getRoute(object $queueable)
Get the route for a given queueable instance.
void
set(array|string $class, UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)
Register the queue route for the given class.
array
all()
Get all registered queue routes.
Details
at line 23
string|null
getConnection(object $queueable)
Get the queue connection that a given queueable instance should be routed to.
at line 39
string|null
getQueue(object $queueable)
Get the queue that a given queueable instance should be routed to.
at line 57
array|string|null
getRoute(object $queueable)
Get the route for a given queueable instance.
at line 87
void
set(array|string $class, UnitEnum|string|null $queue = null, UnitEnum|string|null $connection = null)
Register the queue route for the given class.
Boot-only. The route persists on the singleton registry for the worker lifetime and affects every subsequent dispatch of that class.
at line 106
array
all()
Get all registered queue routes.