W3cubDocs

/Laravel 5.8

CallQueuedHandler

class CallQueuedHandler (View source)

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 ensureNextJobInChainIsDispatched(mixed $command)

Ensure the next job in the chain is dispatched if applicable.

void handleModelNotFound(Job $job, Exception $e)

Handle a model not found exception.

void failed(array $data, Exception $e)

Call the failed method on the job instance.

Details

void __construct(Dispatcher $dispatcher)

Create a new handler instance.

Parameters

Dispatcher $dispatcher

Return Value

void

void call(Job $job, array $data)

Handle the queued job.

Parameters

Job $job
array $data

Return Value

void

protected mixed resolveHandler(Job $job, mixed $command)

Resolve the handler for the given command.

Parameters

Job $job
mixed $command

Return Value

mixed

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

protected void ensureNextJobInChainIsDispatched(mixed $command)

Ensure the next job in the chain is dispatched if applicable.

Parameters

mixed $command

Return Value

void

protected void handleModelNotFound(Job $job, Exception $e)

Handle a model not found exception.

Parameters

Job $job
Exception $e

Return Value

void

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

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Queue/CallQueuedHandler.html