SymfonyStyle
class SymfonyStyle extends OutputStyle
Output decorator helpers for the Symfony Style Guide.
Constants
MAX_LINE_LENGTH |
|
Methods
Add newline(s).
No description
Writes a message to the output.
Writes a message to the output and adds a newline at the end.
Formats a message as a block of text.
Formats a command title.
Formats a section title.
Formats a list.
Formats informational text.
Formats a command comment.
Formats a success result bar.
Formats an error result bar.
Formats an warning result bar.
Formats a note admonition.
Formats a caution admonition.
Formats a table.
Asks a question.
Asks a question with the user input hidden.
Asks for confirmation.
Asks a choice question.
Starts the progress output.
Advances the progress output X steps.
Finishes the progress output.
Returns a new instance which makes use of stderr if available.
Details
write(string|iterable $messages, bool $newline = false, $type = self::OUTPUT_NORMAL)
Writes a message to the output.
writeln(string|iterable $messages, $type = self::OUTPUT_NORMAL)
Writes a message to the output and adds a newline at the end.
block(string|array $messages, string|null $type = null, string|null $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
Formats a message as a block of text.
mixed
ask(string $question, string|null $default = null, callable|null $validator = null)
Asks a question.
mixed
askHidden(string $question, callable|null $validator = null)
Asks a question with the user input hidden.