Symfony\Component\Console\Helper\ProgressBar::overwrite PHP Method

overwrite() private method

Overwrites a previous message to the output.
private overwrite ( string $message )
$message string The message
    private function overwrite($message)
    {
        if ($this->overwrite) {
            if (!$this->firstRun) {
                // Move the cursor to the beginning of the line
                $this->output->write("\r");
                // Erase the line
                $this->output->write("");
                // Erase previous lines
                if ($this->formatLineCount > 0) {
                    $this->output->write(str_repeat("", $this->formatLineCount));
                }
            }
        } elseif ($this->step > 0) {
            $this->output->writeln('');
        }
        $this->firstRun = false;
        $this->output->write($message);
    }