DrushStyle
class DrushStyle extends SymfonyStyle (View source)
Methods
No description
No description
No description
Prompt the user for text input.
Prompt the user for input, hiding the value.
Prompt the user to select an option.
Prompt the user to select multiple options.
Prompt the user for text input with auto-completion.
Allow the user to search for multiple option.
Display a progress bar.
No description
No description
No description
No description
Details
void
success(array|string $message)
No description
bool
confirm(string $question, bool $default = true, string $yes = 'Yes', string $no = 'No', bool|string $required = false, Closure|null $validate = null, string $hint = '')
No description
mixed
choice(string $question, array $choices, mixed $default = null, bool $multiSelect = false, int $scroll = 15, Closure|null $validate = null, string $hint = '', bool|string $required = true)
No description
mixed
ask(Stringable|string $question, string|null $default = null, callable|null $validator = null, Stringable|string $placeholder = '', bool|string $required = false, Closure|null $validate = null, Stringable|string $hint = '')
Prompt the user for text input.
string
password(Stringable|string $label, Stringable|string $placeholder = '', bool|string $required = false, Closure|null $validate = null, Stringable|string $hint = '')
Prompt the user for input, hiding the value.
int|string
select(string $label, array $options, int|string|null $default = null, int $scroll = 10, Closure|null $validate = null, string $hint = '', bool|string $required = true)
Prompt the user to select an option.
array
multiselect(string $label, array $options, array $default = [], int $scroll = 10, bool|string $required = false, Closure|null $validate = null, string $hint = 'Use the space bar to select options.')
Prompt the user to select multiple options.
string
suggest(string $label, array|Closure $options, string $placeholder = '', string $default = '', int $scroll = 10, bool|string $required = false, Closure|null $validate = null, string $hint = 'Start typing the first letter(s) and matching choices will be shown.')
Prompt the user for text input with auto-completion.
int|string
search(string $label, Closure $options, string $placeholder = '', int $scroll = 10, Closure|null $validate = null, string $hint = '', bool|string $required = true)
Allow the user to search for an option.
array
multisearch(string $label, Closure $options, string $placeholder = '', int $scroll = 10, bool|string $required = false, Closure|null $validate = null, string $hint = 'Use the space bar to select options.')
Allow the user to search for multiple option.
mixed
spin(Closure $callback, string $message = '')
No description
Progress
progress(string $label, iterable|int $steps, Closure|null $callback = null, string $hint = '')
Display a progress bar.
void
warning(string|array $message)
No description
void
note(string|array $message)
No description
void
caution(string|array $message)
No description
mixed
askRequired($question)
No description