CallQueuedHandler
class CallQueuedHandler (View source)
Properties
protected Dispatcher | $dispatcher | The bus dispatcher implementation. |
|
protected Container | $container | The container instance. |
Methods
void
mixed
dispatchThroughMiddleware(Job $job, mixed $command)
Dispatch the given job / command through its specified middleware.
mixed
mixed
setJobInstanceIfNecessary(Job $job, mixed $instance)
Set the job instance of the given class if necessary.
void
ensureNextJobInChainIsDispatched(mixed $command)
Ensure the next job in the chain is dispatched if applicable.
void
Details
void
__construct(Dispatcher $dispatcher, Container $container)
Create a new handler instance.
void
call(Job $job, array $data)
Handle the queued job.
protected mixed
dispatchThroughMiddleware(Job $job, mixed $command)
Dispatch the given job / command through its specified middleware.
protected mixed
resolveHandler(Job $job, mixed $command)
Resolve the handler for the given command.
protected mixed
setJobInstanceIfNecessary(Job $job, mixed $instance)
Set the job instance of the given class if necessary.
protected void
ensureNextJobInChainIsDispatched(mixed $command)
Ensure the next job in the chain is dispatched if applicable.
void
failed(array $data, Exception $e)
Call the failed method on the job instance.
The exception that caused the failure will be passed.