Property | Type | Description | |
---|---|---|---|
$format | Default format for the progress bar | ||
$registry | Instance of Registry. Used to store metrics. | ||
$replacementRules | array | Stores replacement rules |
Method | Description | |
---|---|---|
__construct ( $current, $max, $width = 80, $doneBarElementCharacter = '=', $remainingBarElementCharacter = '-', $currentPositionCharacter = '>' ) | Class constructor | |
addReplacementRule ( string $tag, integer $priority, callable $callable ) | Register a replacement rule | |
advance ( ) | Advances the progress bar with one step. | |
getFormat ( ) : string | Returns the current output format | |
getRegistry ( ) : |
Returns the Registry | |
setFormat ( string $string ) | Sette le format d'affichage | |
setRegistry ( |
Sets a Registry | |
update ( integer $current ) | Updates current progress Saves new metrics in the registry |
Method | Description | |
---|---|---|
clearRightCharacters ( string $buffer ) : string | Clears line remaining characters so that buffer length always equals to max width. | |
display ( boolean $lineReturn ) | Prints the progress bar | |
registerDefaultReplacementRules ( ) | Allows to define replacements functions for the format string If you wish to add custom replacements rules, extend this class, and add overload this method. |
public __construct ( $current, $max, $width = 80, $doneBarElementCharacter = '=', $remainingBarElementCharacter = '-', $currentPositionCharacter = '>' ) |
protected clearRightCharacters ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected registerDefaultReplacementRules ( ) |
public setRegistry ( |
||
$registry |
protected array $replacementRules | ||
return | array |