class Task extends Component (View source)

Traits

Properties

protected OutputStyle $output

The output style implementation.

from  Component
protected $mutators

The list of mutators to apply on the view data.

from  Component

Methods

void
__construct(OutputStyle $output)

Creates a new component instance.

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

Renders the given view.

void
compile(string $view, array $data)

Compile the given view contents.

array<int,string>|string
mutate(array<int,string>|string $data, $mutators)

Mutates the given data with the given set of mutators.

mixed
usingQuestionHelper(callable $callable)

Eventually performs a question using the component's question helper.

int
secondsUntil(DateTimeInterface|DateInterval|int $delay)

Get the number of seconds until the given DateTime.

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

Get the "available at" UNIX timestamp.

parseDateInterval(DateTimeInterface|DateInterval|int $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 $endTime = null)

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

render($description, $task = null, $verbosity = OutputInterface::VERBOSITY_NORMAL)

No description

Details

void __construct(OutputStyle $output)

Creates a new component instance.

Parameters

OutputStyle $output

Return Value

void

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

Renders the given view.

Parameters

string $view
Arrayable|array $data
int $verbosity

Return Value

void

protected void compile(string $view, array $data)

Compile the given view contents.

Parameters

string $view
array $data

Return Value

void

protected array<int,string>|string mutate(array<int,string>|string $data, $mutators)

Mutates the given data with the given set of mutators.

Parameters

array<int,string>|string $data
$mutators

Return Value

array<int,string>|string

protected mixed usingQuestionHelper(callable $callable)

Eventually performs a question using the component's question helper.

Parameters

callable $callable

Return Value

mixed

protected int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Get the number of seconds until the given DateTime.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

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

Get the "available at" UNIX timestamp.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

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

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

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

DateTimeInterface|int

protected int currentTime()

Get the current system time as a UNIX timestamp.

Return Value

int

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

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

Parameters

float $startTime
float $endTime

Return Value

string

render($description, $task = null, $verbosity = OutputInterface::VERBOSITY_NORMAL)

No description

Parameters

$description
$task
$verbosity