You are here

public function ProgressBar::clear in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Helper/ProgressBar.php \Symfony\Component\Console\Helper\ProgressBar::clear()

Removes the progress bar from the current line.

This is useful if you wish to write some output while a progress bar is running. Call display() to show the progress bar again.

File

vendor/symfony/console/Helper/ProgressBar.php, line 467

Class

ProgressBar
The ProgressBar provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

public function clear() {
  if (!$this->overwrite) {
    return;
  }
  if (null === $this->format) {
    $this
      ->setRealFormat($this->internalFormat ?: $this
      ->determineBestFormat());
  }
  $this
    ->overwrite(str_repeat("\n", $this->formatLineCount));
}