Task
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
Mutates the given data with the given set of mutators.
Eventually performs a question using the component's question helper.
Get the number of seconds until the given DateTime.
If the given value is an interval, convert it to a DateTime instance.
Given a start time, format the total run time for human readability.
No description
Details
void
__construct(OutputStyle $output)
Creates a new component instance.
protected void
renderView(string $view, Arrayable|array $data, int $verbosity)
Renders the given view.
protected void
compile(string $view, array $data)
Compile the given view contents.
protected array<int,string>|string
mutate(array<int,string>|string $data, $mutators)
Mutates the given data with the given set of mutators.
protected mixed
usingQuestionHelper(callable $callable)
Eventually performs a question using the component's question helper.
protected int
secondsUntil(DateTimeInterface|DateInterval|int $delay)
Get the number of seconds until the given DateTime.
protected int
availableAt(DateTimeInterface|DateInterval|int $delay = 0)
Get the "available at" UNIX timestamp.
protected DateTimeInterface|int
parseDateInterval(DateTimeInterface|DateInterval|int $delay)
If the given value is an interval, convert it to a DateTime instance.
protected int
currentTime()
Get the current system time as a UNIX timestamp.
protected 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