/**
* @param int $max Maximum steps (0 if unknown)
*/
public function __construct(OutputInterface
$output, int
$max = 0, float
$minSecondsBetweenRedraws = 1 / 25
) { if ($output instanceof ConsoleOutputInterface
) { $output =
$output->
getErrorOutput();
} $this->output =
$output;
$this->
setMaxSteps($max);
$this->terminal =
new Terminal();
if (0 <
$minSecondsBetweenRedraws) { $this->redrawFreq = null;
$this->minSecondsBetweenRedraws =
$minSecondsBetweenRedraws;
} if (!
$this->output->
isDecorated()) { // disable overwrite when output does not support ANSI codes.
$this->overwrite = false;