CallQueuedHandler
in package
Table of Contents
- $dispatcher : Dispatcher
- The bus dispatcher implementation.
- __construct() : void
- Create a new handler instance.
- call() : void
- Handle the queued job.
- failed() : void
- Call the failed method on the job instance.
- ensureNextJobInChainIsDispatched() : void
- Ensure the next job in the chain is dispatched if applicable.
- handleModelNotFound() : void
- Handle a model not found exception.
- resolveHandler() : mixed
- Resolve the handler for the given command.
- setJobInstanceIfNecessary() : mixed
- Set the job instance of the given class if necessary.
Properties
$dispatcher
The bus dispatcher implementation.
protected
Dispatcher
$dispatcher
Methods
__construct()
Create a new handler instance.
public
__construct(Dispatcher $dispatcher) : void
Parameters
- $dispatcher : Dispatcher
Return values
void —call()
Handle the queued job.
public
call(Job $job, array<string|int, mixed> $data) : void
Parameters
- $job : Job
- $data : array<string|int, mixed>
Return values
void —failed()
Call the failed method on the job instance.
public
failed(array<string|int, mixed> $data, Exception $e) : void
The exception that caused the failure will be passed.
Parameters
- $data : array<string|int, mixed>
- $e : Exception
Return values
void —ensureNextJobInChainIsDispatched()
Ensure the next job in the chain is dispatched if applicable.
protected
ensureNextJobInChainIsDispatched(mixed $command) : void
Parameters
- $command : mixed
Return values
void —handleModelNotFound()
Handle a model not found exception.
protected
handleModelNotFound(Job $job, Exception $e) : void
Parameters
- $job : Job
- $e : Exception
Return values
void —resolveHandler()
Resolve the handler for the given command.
protected
resolveHandler(Job $job, mixed $command) : mixed
Parameters
- $job : Job
- $command : mixed
Return values
mixed —setJobInstanceIfNecessary()
Set the job instance of the given class if necessary.
protected
setJobInstanceIfNecessary(Job $job, mixed $instance) : mixed
Parameters
- $job : Job
- $instance : mixed