class Task

Methods

__construct(Closure $action, Closure|null $response = null, Closure|bool $requirement = true)

Construct a new pending task.

static Task
action(Closure $action)

Make a new pending task instance.

response(Closure $response)

Set the response callback for the task.

requirements(Closure|bool $requirement)

Set the requirement for the task.

void
dispatch(bool $pretending = false)

Handle the task.

void
__invoke(bool $pretending = false)

Handle the task when invoked.

Details

at line 18
__construct(Closure $action, Closure|null $response = null, Closure|bool $requirement = true)

Construct a new pending task.

Parameters

Closure $action
Closure|null $response
Closure|bool $requirement

at line 30
static Task action(Closure $action)

Make a new pending task instance.

Parameters

Closure $action

Return Value

Task

at line 40
Task response(Closure $response)

Set the response callback for the task.

Parameters

Closure $response

Return Value

Task

at line 52
Task requirements(Closure|bool $requirement)

Set the requirement for the task.

Parameters

Closure|bool $requirement

Return Value

Task

at line 62
void dispatch(bool $pretending = false)

Handle the task.

Parameters

bool $pretending

Return Value

void

at line 78
void __invoke(bool $pretending = false)

Handle the task when invoked.

Parameters

bool $pretending

Return Value

void