You are here

public static function ProgressBar::setFormatDefinition in Zircon Profile 8.0

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

Sets a format for a given name.

This method also allow you to override an existing format.

Parameters

string $name The format name:

string $format A format string:

File

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

Class

ProgressBar
The ProgressBar provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

public static function setFormatDefinition($name, $format) {
  if (!self::$formats) {
    self::$formats = self::initFormats();
  }
  self::$formats[$name] = $format;
}