class CallQueuedHandler

Properties

protected Dispatcher $dispatcher

The bus dispatcher implementation.

Methods

void
__construct(Dispatcher $dispatcher)

Create a new handler instance.

void
call(Job $job, array $data)

Handle the queued job.

mixed
resolveHandler(Job $job, mixed $command)

Resolve the handler for the given command.

mixed
setJobInstanceIfNecessary(Job $job, mixed $instance)

Set the job instance of the given class if necessary.

void
failed(array $data, Exception $e)

Call the failed method on the job instance.

Details

at line 23
void __construct(Dispatcher $dispatcher)

Create a new handler instance.

Parameters

Dispatcher $dispatcher

Return Value

void

at line 35
void call(Job $job, array $data)

Handle the queued job.

Parameters

Job $job
array $data

Return Value

void

at line 57
protected mixed resolveHandler(Job $job, mixed $command)

Resolve the handler for the given command.

Parameters

Job $job
mixed $command

Return Value

mixed

at line 75
protected mixed setJobInstanceIfNecessary(Job $job, mixed $instance)

Set the job instance of the given class if necessary.

Parameters

Job $job
mixed $instance

Return Value

mixed

at line 93
void failed(array $data, Exception $e)

Call the failed method on the job instance.

The exception that caused the failure will be passed.

Parameters

array $data
Exception $e

Return Value

void