TYPO3
7.6
|
Public Member Functions | |
__construct ($triggerDeprecationError=true) | |
setBarWidth ($size) | |
setBarCharacter ($char) | |
setEmptyBarCharacter ($char) | |
setProgressCharacter ($char) | |
setFormat ($format) | |
setRedrawFrequency ($freq) | |
start (OutputInterface $output, $max=null) | |
advance ($step=1, $redraw=false) | |
setCurrent ($current, $redraw=false) | |
display ($finish=false) | |
clear () | |
finish () | |
getName () | |
Public Member Functions inherited from Helper | |
setHelperSet (HelperSet $helperSet=null) | |
getHelperSet () | |
Public Attributes | |
const | FORMAT_QUIET = ' %percent%%' |
const | FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%' |
const | FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%' |
const | FORMAT_QUIET_NOMAX = ' %current%' |
const | FORMAT_NORMAL_NOMAX = ' %current% [%bar%]' |
const | FORMAT_VERBOSE_NOMAX = ' %current% [%bar%] Elapsed: %elapsed%' |
Private Member Functions | |
initialize () | |
generate ($finish=false) | |
humaneTime ($secs) | |
overwrite (OutputInterface $output, $message) | |
Private Attributes | |
$barWidth = 28 | |
$barChar = '=' | |
$emptyBarChar = '-' | |
$progressChar = '>' | |
$format = null | |
$redrawFreq = 1 | |
$lastMessagesLength | |
$barCharOriginal | |
$output | |
$current | |
$max | |
$startTime | |
$defaultFormatVars | |
$formatVars | |
$widths | |
$timeFormats | |
Additional Inherited Members | |
Static Public Member Functions inherited from Helper | |
static | strlen ($string) |
static | formatTime ($secs) |
static | formatMemory ($memory) |
static | strlenWithoutDecoration (OutputFormatterInterface $formatter, $string) |
Protected Attributes inherited from Helper | |
$helperSet = null | |
The Progress class provides helpers to display progress output.
Definition at line 26 of file ProgressHelper.php.
__construct | ( | $triggerDeprecationError = true | ) |
Definition at line 121 of file ProgressHelper.php.
advance | ( | $step = 1 , |
|
$redraw = false |
|||
) |
Advances the progress output X steps.
int | $step | Number of steps to advance |
bool | $redraw | Whether to redraw or not |
\LogicException |
Definition at line 241 of file ProgressHelper.php.
References ProgressHelper\setCurrent().
clear | ( | ) |
Removes the progress bar from the current line.
This is useful if you wish to write some output while a progress bar is running. Call display() to show the progress bar again.
Definition at line 307 of file ProgressHelper.php.
References ProgressHelper\overwrite().
display | ( | $finish = false | ) |
Outputs the current progress string.
bool | $finish | Forces the end result |
\LogicException |
Definition at line 287 of file ProgressHelper.php.
References ProgressHelper\$format, ProgressHelper\generate(), and ProgressHelper\overwrite().
Referenced by ProgressHelper\finish(), and ProgressHelper\setCurrent().
finish | ( | ) |
Finishes the progress output.
Definition at line 315 of file ProgressHelper.php.
References ProgressHelper\$barCharOriginal, and ProgressHelper\display().
|
private |
Generates the array map of format variables to values.
bool | $finish | Forces the end result |
Definition at line 360 of file ProgressHelper.php.
References ProgressHelper\$barWidth, ProgressHelper\$max, ProgressHelper\$progressChar, ProgressHelper\$startTime, ProgressHelper\humaneTime(), and Helper\strlen().
Referenced by ProgressHelper\display().
getName | ( | ) |
{Returns the canonical name of this helper.
Implements HelperInterface.
Definition at line 461 of file ProgressHelper.php.
|
private |
Converts seconds into human-readable format.
int | $secs | Number of seconds |
Definition at line 418 of file ProgressHelper.php.
References ProgressHelper\$format.
Referenced by ProgressHelper\generate().
|
private |
Initializes the progress helper.
Definition at line 335 of file ProgressHelper.php.
References ProgressHelper\$barChar, ProgressHelper\$emptyBarChar, and Helper\strlen().
Referenced by ProgressHelper\start().
|
private |
Overwrites a previous message to the output.
OutputInterface | $output | An Output instance |
string | $message | The message |
Definition at line 442 of file ProgressHelper.php.
References Helper\strlen(), and OutputInterface\write().
Referenced by ProgressHelper\clear(), and ProgressHelper\display().
setBarCharacter | ( | $char | ) |
Sets the bar character.
string | $char | A character |
Definition at line 143 of file ProgressHelper.php.
setBarWidth | ( | $size | ) |
Sets the progress bar width.
int | $size | The progress bar size |
Definition at line 133 of file ProgressHelper.php.
setCurrent | ( | $current, | |
$redraw = false |
|||
) |
Sets the current progress.
int | $current | The current progress |
bool | $redraw | Whether to redraw or not |
\LogicException |
Definition at line 254 of file ProgressHelper.php.
References ProgressHelper\$current, and ProgressHelper\display().
Referenced by ProgressHelper\advance().
setEmptyBarCharacter | ( | $char | ) |
Sets the empty bar character.
string | $char | A character |
Definition at line 153 of file ProgressHelper.php.
setFormat | ( | $format | ) |
Sets the progress bar format.
string | $format | The format |
Definition at line 173 of file ProgressHelper.php.
References ProgressHelper\$format.
setProgressCharacter | ( | $char | ) |
Sets the progress bar character.
string | $char | A character |
Definition at line 163 of file ProgressHelper.php.
setRedrawFrequency | ( | $freq | ) |
Sets the redraw frequency.
int | $freq | The frequency in steps |
Definition at line 183 of file ProgressHelper.php.
start | ( | OutputInterface | $output, |
$max = null |
|||
) |
Starts the progress output.
OutputInterface | $output | An Output instance |
int | null | $max | Maximum steps |
Definition at line 194 of file ProgressHelper.php.
References ProgressHelper\$max, OutputInterface\getVerbosity(), ProgressHelper\initialize(), OutputInterface\isDecorated(), OutputInterface\VERBOSITY_DEBUG, OutputInterface\VERBOSITY_QUIET, OutputInterface\VERBOSITY_VERBOSE, and OutputInterface\VERBOSITY_VERY_VERBOSE.
|
private |
Definition at line 37 of file ProgressHelper.php.
Referenced by ProgressHelper\initialize().
|
private |
Definition at line 44 of file ProgressHelper.php.
Referenced by ProgressHelper\finish().
|
private |
Definition at line 36 of file ProgressHelper.php.
Referenced by ProgressHelper\generate().
|
private |
Definition at line 56 of file ProgressHelper.php.
Referenced by ProgressHelper\setCurrent().
|
private |
Definition at line 77 of file ProgressHelper.php.
|
private |
Definition at line 38 of file ProgressHelper.php.
Referenced by ProgressHelper\initialize().
|
private |
Definition at line 40 of file ProgressHelper.php.
Referenced by ProgressHelper\display(), ProgressHelper\humaneTime(), and ProgressHelper\setFormat().
|
private |
Definition at line 90 of file ProgressHelper.php.
|
private |
Definition at line 43 of file ProgressHelper.php.
|
private |
Definition at line 63 of file ProgressHelper.php.
Referenced by ProgressHelper\generate(), and ProgressHelper\start().
|
private |
Definition at line 49 of file ProgressHelper.php.
|
private |
Definition at line 39 of file ProgressHelper.php.
Referenced by ProgressHelper\generate().
|
private |
Definition at line 41 of file ProgressHelper.php.
|
private |
Definition at line 70 of file ProgressHelper.php.
Referenced by ProgressHelper\generate().
|
private |
Definition at line 109 of file ProgressHelper.php.
|
private |
Definition at line 97 of file ProgressHelper.php.
const FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%' |
Definition at line 29 of file ProgressHelper.php.
const FORMAT_NORMAL_NOMAX = ' %current% [%bar%]' |
Definition at line 32 of file ProgressHelper.php.
const FORMAT_QUIET = ' %percent%%' |
Definition at line 28 of file ProgressHelper.php.
const FORMAT_QUIET_NOMAX = ' %current%' |
Definition at line 31 of file ProgressHelper.php.
const FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%' |
Definition at line 30 of file ProgressHelper.php.
const FORMAT_VERBOSE_NOMAX = ' %current% [%bar%] Elapsed: %elapsed%' |
Definition at line 33 of file ProgressHelper.php.