class DeferredCallback

Properties

Closure $callback

The deferred callback.

Methods

__construct(callable $callback, string|null $name = null, bool $always = false)

Create a new deferred callback instance.

name(string $name)

Specify the callback name.

always(bool $always = true)

Indicate that the callback should run on unsuccessful requests and jobs.

void
__invoke()

Invoke the deferred callback.

Details

at line 20
__construct(callable $callback, string|null $name = null, bool $always = false)

Create a new deferred callback instance.

Parameters

callable $callback
string|null $name
bool $always

at line 32
DeferredCallback name(string $name)

Specify the callback name.

Parameters

string $name

Return Value

DeferredCallback

at line 42
DeferredCallback always(bool $always = true)

Indicate that the callback should run on unsuccessful requests and jobs.

Parameters

bool $always

Return Value

DeferredCallback

at line 52
void __invoke()

Invoke the deferred callback.

Return Value

void