trait InvokesQueuedResponseCallbacks

Properties

protected array $thenCallbacks
protected array $catchCallbacks

Methods

mixed
withCallbacks(Closure $action)

Invoke the given Closure then invoke the "then" callbacks.

then(Closure $callback)

Add a callback to be executed after the agent is invoked.

catch(Closure $callback)

Add a callback to be executed if the job fails.

void
failed(Throwable|null $e)

Handle a job failure.

Details

at line 20
protected mixed withCallbacks(Closure $action)

Invoke the given Closure then invoke the "then" callbacks.

Parameters

Closure $action

Return Value

mixed

at line 34
InvokesQueuedResponseCallbacks then(Closure $callback)

Add a callback to be executed after the agent is invoked.

Parameters

Closure $callback

Return Value

InvokesQueuedResponseCallbacks

at line 44
InvokesQueuedResponseCallbacks catch(Closure $callback)

Add a callback to be executed if the job fails.

Parameters

Closure $callback

Return Value

InvokesQueuedResponseCallbacks

at line 54
void failed(Throwable|null $e)

Handle a job failure.

Parameters

Throwable|null $e

Return Value

void