class ProgressHelper extends Helper

deprecated since version 2.5, to be removed in 3.0 Use {@link ProgressBar} instead.

The Progress class provides helpers to display progress output.

Constants

FORMAT_QUIET

FORMAT_NORMAL

FORMAT_VERBOSE

FORMAT_QUIET_NOMAX

FORMAT_NORMAL_NOMAX

FORMAT_VERBOSE_NOMAX

Methods

setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

from Helper
getHelperSet()

Gets the helper set associated with this helper.

from Helper
static int
strlen(string $string)

Returns the length of a string, using mb_strwidth if it is available.

from Helper
static 
formatTime($secs)

No description

from Helper
static 
formatMemory($memory)

No description

from Helper
static 
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

No description

from Helper
__construct($triggerDeprecationError = true)

No description

setBarWidth(int $size)

Sets the progress bar width.

setBarCharacter(string $char)

Sets the bar character.

setEmptyBarCharacter(string $char)

Sets the empty bar character.

setProgressCharacter(string $char)

Sets the progress bar character.

setFormat(string $format)

Sets the progress bar format.

setRedrawFrequency(int $freq)

Sets the redraw frequency.

start(OutputInterface $output, int|null $max = null)

Starts the progress output.

advance(int $step = 1, bool $redraw = false)

Advances the progress output X steps.

setCurrent(int $current, bool $redraw = false)

Sets the current progress.

display(bool $finish = false)

Outputs the current progress string.

clear()

Removes the progress bar from the current line.

finish()

Finishes the progress output.

string
getName()

Returns the canonical name of this helper.

Details

in Helper at line line 30
setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

Parameters

HelperSet $helperSet A HelperSet instance

in Helper at line line 40
HelperSet getHelperSet()

Gets the helper set associated with this helper.

Return Value

HelperSet A HelperSet instance

in Helper at line line 52
static int strlen(string $string)

Returns the length of a string, using mb_strwidth if it is available.

Parameters

string $string The string to check its length

Return Value

int The length of the string

in Helper at line line 61
static formatTime($secs)

Parameters

$secs

in Helper at line line 88
static formatMemory($memory)

Parameters

$memory

in Helper at line line 105
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)

Parameters

OutputFormatterInterface $formatter
$string

at line line 122
__construct($triggerDeprecationError = true)

Parameters

$triggerDeprecationError

at line line 134
setBarWidth(int $size)

Sets the progress bar width.

Parameters

int $size The progress bar size

at line line 144
setBarCharacter(string $char)

Sets the bar character.

Parameters

string $char A character

at line line 154
setEmptyBarCharacter(string $char)

Sets the empty bar character.

Parameters

string $char A character

at line line 164
setProgressCharacter(string $char)

Sets the progress bar character.

Parameters

string $char A character

at line line 174
setFormat(string $format)

Sets the progress bar format.

Parameters

string $format The format

at line line 184
setRedrawFrequency(int $freq)

Sets the redraw frequency.

Parameters

int $freq The frequency in steps

at line line 195
start(OutputInterface $output, int|null $max = null)

Starts the progress output.

Parameters

OutputInterface $output An Output instance
int|null $max Maximum steps

at line line 242
advance(int $step = 1, bool $redraw = false)

Advances the progress output X steps.

Parameters

int $step Number of steps to advance
bool $redraw Whether to redraw or not

Exceptions

LogicException

at line line 255
setCurrent(int $current, bool $redraw = false)

Sets the current progress.

Parameters

int $current The current progress
bool $redraw Whether to redraw or not

Exceptions

LogicException

at line line 288
display(bool $finish = false)

Outputs the current progress string.

Parameters

bool $finish Forces the end result

Exceptions

LogicException

at line line 308
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.

at line line 316
finish()

Finishes the progress output.

at line line 462
string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name