You are here

private function ProgressBar::setRealFormat 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::setRealFormat()

Sets the progress bar format.

Parameters

string $format The format:

2 calls to ProgressBar::setRealFormat()
ProgressBar::clear in vendor/symfony/console/Helper/ProgressBar.php
Removes the progress bar from the current line.
ProgressBar::display in vendor/symfony/console/Helper/ProgressBar.php
Outputs the current progress string.

File

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

Class

ProgressBar
The ProgressBar provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

private function setRealFormat($format) {

  // try to use the _nomax variant if available
  if (!$this->max && null !== self::getFormatDefinition($format . '_nomax')) {
    $this->format = self::getFormatDefinition($format . '_nomax');
  }
  elseif (null !== self::getFormatDefinition($format)) {
    $this->format = self::getFormatDefinition($format);
  }
  else {
    $this->format = $format;
  }
  $this->formatLineCount = substr_count($this->format, "\n");
}