class ProgressIndicator

Methods

__construct(OutputInterface $output, string|null $format = null, int $indicatorChangeInterval = 100, array|null $indicatorValues = null)

No description

setMessage(string|null $message)

Sets the current indicator message.

string|null
getMessage()

Gets the current indicator message.

int
getStartTime()

Gets the progress bar start time.

string
getCurrentValue()

Gets the current animated indicator character.

start($message)

Starts the indicator output.

advance()

Advances the indicator.

finish($message)

Finish the indicator with message.

static string|null
getFormatDefinition(string $name)

Gets the format for a given name.

static 
setPlaceholderFormatterDefinition(string $name, callable $callable)

Sets a placeholder formatter for a given name.

static callable|null
getPlaceholderFormatterDefinition(string $name)

Gets the placeholder formatter for a given name.

Details

at line line 41
__construct(OutputInterface $output, string|null $format = null, int $indicatorChangeInterval = 100, array|null $indicatorValues = null)

Parameters

OutputInterface $output
string|null $format Indicator format
int $indicatorChangeInterval Change interval in milliseconds
array|null $indicatorValues Animated indicator characters

at line line 70
setMessage(string|null $message)

Sets the current indicator message.

Parameters

string|null $message

at line line 84
string|null getMessage()

Gets the current indicator message.

Return Value

string|null

at line line 96
int getStartTime()

Gets the progress bar start time.

Return Value

int The progress bar start time

at line line 108
string getCurrentValue()

Gets the current animated indicator character.

Return Value

string

at line line 118
start($message)

Starts the indicator output.

Parameters

$message

at line line 137
advance()

Advances the indicator.

at line line 164
finish($message)

Finish the indicator with message.

Parameters

$message

at line line 183
static string|null getFormatDefinition(string $name)

Gets the format for a given name.

Parameters

string $name The format name

Return Value

string|null A format string

at line line 200
static setPlaceholderFormatterDefinition(string $name, callable $callable)

Sets a placeholder formatter for a given name.

This method also allow you to override an existing placeholder.

Parameters

string $name The placeholder name (including the delimiter char like %)
callable $callable A PHP callable

at line line 216
static callable|null getPlaceholderFormatterDefinition(string $name)

Gets the placeholder formatter for a given name.

Parameters

string $name The placeholder name (including the delimiter char like %)

Return Value

callable|null A PHP callable