public static endProgress ( string | boolean $remove = false, boolean $keepPrefix = true ) | ||
$remove | string | boolean | This can be `false` to leave the progress bar on screen and just print a newline. If set to `true`, the line of the progress bar will be cleared. This may also be a string to be displayed instead of the progress bar. |
$keepPrefix | boolean | whether to keep the prefix that has been specified for the progressbar when progressbar gets removed. Defaults to true. |
public static function endProgress($remove = false, $keepPrefix = true)
{
if ($remove === false) {
static::stdout(PHP_EOL);
} else {
if (static::streamSupportsAnsiColors(STDOUT)) {
static::clearLine();
}
static::stdout("\r" . ($keepPrefix ? self::$_progressPrefix : '') . (is_string($remove) ? $remove : ''));
}
flush();
self::$_progressStart = null;
self::$_progressWidth = null;
self::$_progressPrefix = '';
self::$_progressEta = null;
self::$_progressEtaLastDone = 0;
self::$_progressEtaLastUpdate = null;
}