| Methods |
public
|
hasArgument(string|int $name): bool
Determine if the given argument is present.
Determine if the given argument is present.
|
#
|
public
|
argument(
string|null $key = null,
): ($key is null ? array<array|string|float|int|bool|null> : array|string|float|int|bool|null)
Get the value of a command argument.
Get the value of a command argument.
|
#
|
public
|
arguments(): array<array|string|float|int|bool|null>
Get all of the arguments passed to the command.
Get all of the arguments passed to the command.
|
#
|
public
|
hasOption(string $name): bool
Determine whether the option is defined in the command signature.
Determine whether the option is defined in the command signature.
|
#
|
public
|
option(
string|null $key = null,
): ($key is null ? array<array|string|float|int|bool|null> : array|string|float|int|bool|null)
Get the value of a command option.
Get the value of a command option.
|
#
|
public
|
options(): array<array|string|float|int|bool|null>
Get all of the options passed to the command.
Get all of the options passed to the command.
|
#
|
public
|
confirm(string $question, bool $default = false): bool
Confirm a question with the user.
Confirm a question with the user.
|
#
|
public
|
ask(string $question, string|null $default = null): mixed
Prompt the user for input.
Prompt the user for input.
|
#
|
public
|
anticipate(string $question, array|callable $choices, string|null $default = null): mixed
Prompt the user for input with auto completion.
Prompt the user for input with auto completion.
|
#
|
public
|
askWithCompletion(string $question, iterable|(callable(string): string[]) $choices, string|null $default = null): mixed
Prompt the user for input with auto completion.
Prompt the user for input with auto completion.
|
#
|
public
|
secret(string $question, bool $fallback = true): mixed
Prompt the user for input but hide the answer from the console.
Prompt the user for input but hide the answer from the console.
|
#
|
public
|
choice(
string $question,
array<Stringable|string|float|int|bool> $choices,
string|int|null $default = null,
?positive-int $attempts = null,
bool $multiple = false,
): string|array
Give the user a single choice from an array of answers.
Give the user a single choice from an array of answers.
|
#
|
public
|
table(
array $headers,
Arrayable|array $rows,
TableStyle|string $tableStyle = 'default',
array<int, TableStyle|string> $columnStyles = [],
): void
Format input to textual table.
Format input to textual table.
|
#
|
public
|
withProgressBar<TKey is array-key, TValue, TIterable is iterable<TKey, TValue>>(
TIterable|int $totalSteps,
(Closure(ProgressBar): mixed)|(Closure(TValue, ProgressBar, TKey): mixed) $callback,
): ($totalSteps is iterable ? TIterable : void)
Execute a given callback while advancing a progress bar.
Execute a given callback while advancing a progress bar.
|
#
|
public
|
info(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string as information output.
Write a string as information output.
|
#
|
public
|
line(
string $string,
'info'|'comment'|'question'|'error'|'warn'|'alert'|null $style = null,
'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null,
): void
Write a string as standard output.
Write a string as standard output.
|
#
|
public
|
comment(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string as comment output.
Write a string as comment output.
|
#
|
public
|
question(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string as question output.
Write a string as question output.
|
#
|
public
|
error(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string as error output.
Write a string as error output.
|
#
|
public
|
warn(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string as warning output.
Write a string as warning output.
|
#
|
public
|
alert(string $string, 'v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $verbosity = null): void
Write a string in an alert box.
Write a string in an alert box.
|
#
|
public
|
newLine(int $count = 1): $this
Write a blank line.
|
#
|
public
|
setInput(InputInterface $input): void
Set the input interface implementation.
Set the input interface implementation.
|
#
|
public
|
setOutput(OutputStyle $output): void
Set the output interface implementation.
Set the output interface implementation.
|
#
|
protected
|
setVerbosity('v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_* $level): void
Set the verbosity level.
|
#
|
protected
|
parseVerbosity('v'|'vv'|'vvv'|'quiet'|'normal'|OutputInterface::VERBOSITY_*|null $level = null): int
Get the verbosity level in terms of Symfony's OutputInterface level.
Get the verbosity level in terms of Symfony's OutputInterface level.
|
#
|
public
|
getOutput(): OutputStyle
Get the output implementation.
Get the output implementation.
|
#
|
public
|
outputComponents(): Factory
Get the output component factory implementation.
Get the output component factory implementation.
|
#
|