class Task extends Component

Traits

Properties

protected array<int, callable(string): string> $mutators

The list of mutators to apply on the view data.

from  Component

Methods

__construct(OutputInterface $output)

Create a new component instance.

void
renderView(string $view, array $data, int $verbosity)

Render the given view.

string
compile(string $view, array $data)

Compile the given view contents.

array|string
mutate(array|string $data, array $mutators)

Mutate the given data with the given set of mutators.

mixed
usingQuestionHelper(callable $callable)

Perform a question using the component's question helper.

int
secondsUntil(DateInterval|DateTimeInterface|int $delay)

Get the number of seconds until the given DateTime.

int
availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)

Get the "available at" UNIX timestamp.

parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)

If the given value is an interval, convert it to a DateTime instance.

int
currentTime()

Get the current system time as a UNIX timestamp.

string
runTimeForHumans(float $startTime, float|null $endTime = null)

Given a start time, format the total run time for human readability.

void
render(string $description, callable|null $task = null, int $verbosity = OutputInterface::VERBOSITY_NORMAL)

Render the component using the given arguments.

Details

in Component at line 28
__construct(OutputInterface $output)

Create a new component instance.

Parameters

OutputInterface $output

in Component at line 36
protected void renderView(string $view, array $data, int $verbosity)

Render the given view.

Parameters

string $view
array $data
int $verbosity

Return Value

void

in Component at line 46
protected string compile(string $view, array $data)

Compile the given view contents.

Parameters

string $view
array $data

Return Value

string

in Component at line 66
protected array|string mutate(array|string $data, array $mutators)

Mutate the given data with the given set of mutators.

Parameters

array|string $data
array $mutators

Return Value

array|string

in Component at line 86
protected mixed usingQuestionHelper(callable $callable)

Perform a question using the component's question helper.

Parameters

callable $callable

Return Value

mixed

in InteractsWithTime at line 17
protected int secondsUntil(DateInterval|DateTimeInterface|int $delay)

Get the number of seconds until the given DateTime.

Parameters

DateInterval|DateTimeInterface|int $delay

Return Value

int

in InteractsWithTime at line 29
protected int availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)

Get the "available at" UNIX timestamp.

Parameters

DateInterval|DateTimeInterface|int|null $delay

Return Value

int

in InteractsWithTime at line 41
protected DateTimeInterface|int parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)

If the given value is an interval, convert it to a DateTime instance.

Parameters

DateInterval|DateTimeInterface|int|null $delay

Return Value

DateTimeInterface|int

in InteractsWithTime at line 57
protected int currentTime()

Get the current system time as a UNIX timestamp.

Return Value

int

in InteractsWithTime at line 65
protected string runTimeForHumans(float $startTime, float|null $endTime = null)

Given a start time, format the total run time for human readability.

Parameters

float $startTime
float|null $endTime

Return Value

string

at line 23
void render(string $description, callable|null $task = null, int $verbosity = OutputInterface::VERBOSITY_NORMAL)

Render the component using the given arguments.

Parameters

string $description
callable|null $task
int $verbosity

Return Value

void