framework/helpers/BaseConsole.php
public static function startProgress($done, $total, $prefix = '', $width = null)
    {
        self::$_progressStart = time();
        self::$_progressWidth = $width;
        self::$_progressPrefix = $prefix;
        self::$_progressEta = null;
        self::$_progressEtaLastDone = 0;
        self::$_progressEtaLastUpdate = time();

        static::updateProgress($done, $total);
    }
public static function startProgress($done, $total, $prefix = '', $width = null)
    {
        self::$_progressStart = time();
        self::$_progressWidth = $width;
        self::$_progressPrefix = $prefix;
        self::$_progressEta = null;
        self::$_progressEtaLastDone = 0;
        self::$_progressEtaLastUpdate = time();

        static::updateProgress($done, $total);
    }
public static function startProgress ( $ done , $ total , $ prefix = '' , $ width = null ) { self :: $ _progressStart = time ( ) ; self :: $ _progressWidth = $ width ; self :: $ _progressPrefix = $ prefix ; self :: $ _progressEta = null ; self :: $ _progressEtaLastDone = 0 ; self :: $ _progressEtaLastUpdate = time ( ) ; static :: updateProgress ( $ done , $ total ) ; }
Starts display of a progress bar on screen.

This bar will be updated by [[updateProgress()]] and my be ended by [[endProgress()]].

The following example shows a simple usage of a progress bar:

```php
Console::startProgress(0, 1000);
for ($n = 1; $n <= 1000; $n++) {
usleep(1000);
Console::updateProgress($n, 1000);
}
Console::endProgress();
```

Git clone like progress (showing only status information):
```php
Console::startProgress(0, 1000, 'Counting objects: ', false);
for ($n = 1; $n <= 1000; $n++) {
usleep(1000);
Console::updateProgress($n, 1000);
}
Console::endProgress("done." . PHP_EOL);
```

@param int $done the number of items that are completed.
@param int $total the total value of items that are to be done.
@param string $prefix an optional string to display before the progress bar.
Default to empty string which results in no prefix to be displayed.
@param int|bool $width optional width of the progressbar. This can be an integer representing
the number of characters to display for the progress bar or a float between 0 and 1 representing the
percentage of screen with the progress bar may take. It can also be set to false to disable the
bar and only show progress information like percent, number of items and ETA.
If not set, the bar will be as wide as the screen. Screen size will be detected using [[getScreenSize()]].
@see startProgress
@see updateProgress
@see endProgress
Starts display of a progress bar on screen .