You are here

private function ProgressHelper::initialize in Zircon Profile 8

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

Initializes the progress helper.

1 call to ProgressHelper::initialize()
ProgressHelper::start in vendor/symfony/console/Helper/ProgressHelper.php
Starts the progress output.

File

vendor/symfony/console/Helper/ProgressHelper.php, line 335

Class

ProgressHelper
The Progress class provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

private function initialize() {
  $this->formatVars = array();
  foreach ($this->defaultFormatVars as $var) {
    if (false !== strpos($this->format, "%{$var}%")) {
      $this->formatVars[$var] = true;
    }
  }
  if ($this->max > 0) {
    $this->widths['max'] = $this
      ->strlen($this->max);
    $this->widths['current'] = $this->widths['max'];
  }
  else {
    $this->barCharOriginal = $this->barChar;
    $this->barChar = $this->emptyBarChar;
  }
}