function ProgressIndicator::__construct
Parameters
int $indicatorChangeInterval Change interval in milliseconds:
array|null $indicatorValues Animated indicator characters:
File
-
vendor/
symfony/ console/ Helper/ ProgressIndicator.php, line 53
Class
- ProgressIndicator
- @author Kevin Bond <kevinbond@gmail.com>
Namespace
Symfony\Component\Console\HelperCode
public function __construct(OutputInterface $output, ?string $format = null, int $indicatorChangeInterval = 100, ?array $indicatorValues = null, ?string $finishedIndicatorValue = null) {
$format ??= $this->determineBestFormat();
$indicatorValues ??= [
'-',
'\\',
'|',
'/',
];
$indicatorValues = array_values($indicatorValues);
$finishedIndicatorValue ??= '✔';
if (2 > \count($indicatorValues)) {
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
}
$this->format = self::getFormatDefinition($format);
$this->indicatorValues = $indicatorValues;
$this->finishedIndicatorValue = $finishedIndicatorValue;
$this->startTime = time();
}