function ProgressBar::setPlaceholderFormatterDefinition
Sets a placeholder formatter for a given name, globally for all instances of ProgressBar.
This method also allow you to override an existing placeholder.
Parameters
string $name The placeholder name (including the delimiter char like %):
callable(ProgressBar):string $callable A PHP callable:
File
-
vendor/
symfony/ console/ Helper/ ProgressBar.php, line 105
Class
- ProgressBar
- The ProgressBar provides helpers to display progress output.
Namespace
Symfony\Component\Console\HelperCode
public static function setPlaceholderFormatterDefinition(string $name, callable $callable) : void {
self::$formatters ??= self::initPlaceholderFormatters();
self::$formatters[$name] = $callable;
}