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.
{@inheritdoc}
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.
Details
at line line 47
__construct(InputInterface $input, OutputInterface $output)
at line line 361
newLine(int $count = 1)
Add newline(s).
at line line 302
ProgressBar
createProgressBar(int $max)
at line line 352
write(string|array $messages, bool $newline = false, $type = self::OUTPUT_NORMAL)
Writes a message to the output.
at line line 343
writeln(string|array $messages, $type = self::OUTPUT_NORMAL)
Writes a message to the output and adds a newline at the end.
in OutputStyle at line line 72
setVerbosity(int $level)
Sets the verbosity of the output.
in OutputStyle at line line 80
int
getVerbosity()
Gets the current verbosity of the output.
in OutputStyle at line line 88
setDecorated(bool $decorated)
Sets the decorated flag.
in OutputStyle at line line 96
bool
isDecorated()
Gets the decorated flag.
in OutputStyle at line line 104
setFormatter(OutputFormatterInterface $formatter)
Sets output formatter.
in OutputStyle at line line 112
OutputFormatterInterface
getFormatter()
Returns current output formatter instance.
at line line 66
block(string|array $messages, string|null $type = null, string|null $style = null, string $prefix = ' ', bool $padding = false)
Formats a message as a block of text.
at line line 108
title(string $message)
Formats a command title.
at line line 121
section(string $message)
Formats a section title.
at line line 134
listing(array $elements)
Formats a list.
at line line 148
text(string|array $message)
Formats informational text.
at line line 161
comment($message)
{@inheritdoc}
at line line 174
success(string|array $message)
Formats a success result bar.
at line line 182
error(string|array $message)
Formats an error result bar.
at line line 190
warning(string|array $message)
Formats an warning result bar.
at line line 198
note(string|array $message)
Formats a note admonition.
at line line 206
caution(string|array $message)
Formats a caution admonition.
at line line 214
table(array $headers, array $rows)
Formats a table.
at line line 230
string
ask(string $question, string|null $default = null, callable|null $validator = null)
Asks a question.
at line line 241
string
askHidden(string $question, callable|null $validator = null)
Asks a question with the user input hidden.
at line line 254
bool
confirm(string $question, bool $default = true)
Asks for confirmation.
at line line 262
string
choice(string $question, array $choices, string|int|null $default = null)
Asks a choice question.
at line line 275
progressStart(int $max)
Starts the progress output.
at line line 284
progressAdvance(int $step = 1)
Advances the progress output X steps.
at line line 292
progressFinish()
Finishes the progress output.