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): string|array|null
Get the value of a command argument.
Get the value of a command argument.
|
#
|
public
|
arguments(): array
Get all of the arguments passed to the command.
Get all of the arguments passed to the command.
|
#
|
public
|
hasOption(string $name): bool
Determine if the given option is present.
Determine if the given option is present.
|
#
|
public
|
option(string|null $key = null): string|array|bool|null
Get the value of a command option.
Get the value of a command option.
|
#
|
public
|
options(): array
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, 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
|
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 $choices,
string|null $default = null,
mixed|null $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, string $tableStyle = 'default', array $columnStyles = []): void
Format input to textual table.
Format input to textual table.
|
#
|
public
|
withProgressBar(iterable|int $totalSteps, Closure $callback): mixed|void
Execute a given callback while advancing a progress bar.
Execute a given callback while advancing a progress bar.
|
#
|
public
|
info(string $string, int|string|null $verbosity = null): void
Write a string as information output.
Write a string as information output.
|
#
|
public
|
line(string $string, string|null $style = null, int|string|null $verbosity = null): void
Write a string as standard output.
Write a string as standard output.
|
#
|
public
|
comment(string $string, int|string|null $verbosity = null): void
Write a string as comment output.
Write a string as comment output.
|
#
|
public
|
question(string $string, int|string|null $verbosity = null): void
Write a string as question output.
Write a string as question output.
|
#
|
public
|
error(string $string, int|string|null $verbosity = null): void
Write a string as error output.
Write a string as error output.
|
#
|
public
|
warn(string $string, int|string|null $verbosity = null): void
Write a string as warning output.
Write a string as warning output.
|
#
|
public
|
alert(string $string): void
Write a string in an alert box.
Write a string in an alert box.
|
#
|
public
|
newLine(int $count = 1): void
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.
|
#
|
public
|
getOutput(): OutputStyle
Get the output implementation.
Get the output implementation.
|
#
|