TYPO3
7.6
|
Public Member Functions | |
__construct (InputInterface $input, OutputInterface $output) | |
block ($messages, $type=null, $style=null, $prefix= ' ', $padding=false) | |
title ($message) | |
section ($message) | |
listing (array $elements) | |
text ($message) | |
success ($message) | |
error ($message) | |
warning ($message) | |
note ($message) | |
caution ($message) | |
table (array $headers, array $rows) | |
ask ($question, $default=null, $validator=null) | |
askHidden ($question, $validator=null) | |
confirm ($question, $default=true) | |
choice ($question, array $choices, $default=null) | |
progressStart ($max=0) | |
progressAdvance ($step=1) | |
progressFinish () | |
createProgressBar ($max=0) | |
askQuestion (Question $question) | |
writeln ($messages, $type=self::OUTPUT_NORMAL) | |
write ($messages, $newline=false, $type=self::OUTPUT_NORMAL) | |
newLine ($count=1) | |
Public Member Functions inherited from OutputStyle | |
__construct (OutputInterface $output) | |
newLine ($count=1) | |
createProgressBar ($max=0) | |
write ($messages, $newline=false, $type=self::OUTPUT_NORMAL) | |
writeln ($messages, $type=self::OUTPUT_NORMAL) | |
setVerbosity ($level) | |
getVerbosity () | |
setDecorated ($decorated) | |
isDecorated () | |
setFormatter (OutputFormatterInterface $formatter) | |
getFormatter () | |
Public Attributes | |
const | MAX_LINE_LENGTH = 120 |
Private Member Functions | |
getProgressBar () | |
getTerminalWidth () | |
autoPrependBlock () | |
autoPrependText () | |
reduceBuffer ($messages) | |
Private Attributes | |
$input | |
$questionHelper | |
$progressBar | |
$lineLength | |
$bufferedOutput | |
Output decorator helpers for the Symfony Style Guide.
Definition at line 32 of file SymfonyStyle.php.
__construct | ( | InputInterface | $input, |
OutputInterface | $output | ||
) |
InputInterface | $input | |
OutputInterface | $output |
Definition at line 46 of file SymfonyStyle.php.
References SymfonyStyle\$input, OutputInterface\getFormatter(), SymfonyStyle\getTerminalWidth(), and OutputInterface\getVerbosity().
ask | ( | $question, | |
$default = null , |
|||
$validator = null |
|||
) |
{Asks a question.
string | $question | |
string | null | $default | |
callable | null | $validator |
Implements StyleInterface.
Definition at line 221 of file SymfonyStyle.php.
References SymfonyStyle\askQuestion().
askHidden | ( | $question, | |
$validator = null |
|||
) |
{Asks a question with the user input hidden.
string | $question | |
callable | null | $validator |
Implements StyleInterface.
Definition at line 232 of file SymfonyStyle.php.
References SymfonyStyle\askQuestion().
askQuestion | ( | Question | $question | ) |
Question | $question |
Definition at line 311 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependBlock(), and SymfonyStyle\newLine().
Referenced by SymfonyStyle\ask(), SymfonyStyle\askHidden(), SymfonyStyle\choice(), and SymfonyStyle\confirm().
|
private |
Definition at line 378 of file SymfonyStyle.php.
References SymfonyStyle\newLine().
Referenced by SymfonyStyle\askQuestion(), SymfonyStyle\block(), SymfonyStyle\section(), and SymfonyStyle\title().
|
private |
Definition at line 389 of file SymfonyStyle.php.
References SymfonyStyle\newLine().
Referenced by SymfonyStyle\listing(), and SymfonyStyle\text().
block | ( | $messages, | |
$type = null , |
|||
$style = null , |
|||
$prefix = ' ' , |
|||
$padding = false |
|||
) |
Formats a message as a block of text.
string | array | $messages | The message to write in the block |
string | null | $type | The block type (added in [] on first line) |
string | null | $style | The style to apply to the whole block |
string | $prefix | The prefix for the block |
bool | $padding | Whether to add vertical padding |
Definition at line 65 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependBlock(), OutputFormatter\escape(), OutputStyle\getFormatter(), OutputStyle\isDecorated(), SymfonyStyle\newLine(), Helper\strlen(), Helper\strlenWithoutDecoration(), and SymfonyStyle\writeln().
Referenced by SymfonyStyle\caution(), SymfonyStyle\error(), SymfonyStyle\note(), SymfonyStyle\success(), and SymfonyStyle\warning().
caution | ( | $message | ) |
{Formats a caution admonition.
string | array | $message |
Implements StyleInterface.
Definition at line 197 of file SymfonyStyle.php.
References SymfonyStyle\block().
choice | ( | $question, | |
array | $choices, | ||
$default = null |
|||
) |
{Asks a choice question.
string | $question | |
array | $choices | |
string | int | null | $default |
Implements StyleInterface.
Definition at line 253 of file SymfonyStyle.php.
References SymfonyStyle\askQuestion().
confirm | ( | $question, | |
$default = true |
|||
) |
{Asks for confirmation.
string | $question | |
bool | $default |
Implements StyleInterface.
Definition at line 245 of file SymfonyStyle.php.
References SymfonyStyle\askQuestion().
createProgressBar | ( | $max = 0 | ) |
{}
Definition at line 293 of file SymfonyStyle.php.
References SymfonyStyle\$progressBar.
Referenced by SymfonyStyle\progressStart().
error | ( | $message | ) |
{Formats an error result bar.
string | array | $message |
Implements StyleInterface.
Definition at line 173 of file SymfonyStyle.php.
References SymfonyStyle\block().
|
private |
Definition at line 361 of file SymfonyStyle.php.
References SymfonyStyle\$progressBar.
Referenced by SymfonyStyle\progressAdvance(), and SymfonyStyle\progressFinish().
|
private |
Definition at line 370 of file SymfonyStyle.php.
Referenced by SymfonyStyle\__construct().
listing | ( | array | $elements | ) |
{Formats a list.
array | $elements |
Implements StyleInterface.
Definition at line 133 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependText(), SymfonyStyle\newLine(), and SymfonyStyle\writeln().
newLine | ( | $count = 1 | ) |
{Add newline(s).
int | $count | The number of newlines |
Implements StyleInterface.
Definition at line 352 of file SymfonyStyle.php.
Referenced by SymfonyStyle\askQuestion(), SymfonyStyle\autoPrependBlock(), SymfonyStyle\autoPrependText(), SymfonyStyle\block(), SymfonyStyle\listing(), SymfonyStyle\progressFinish(), SymfonyStyle\section(), SymfonyStyle\table(), and SymfonyStyle\title().
note | ( | $message | ) |
{Formats a note admonition.
string | array | $message |
Implements StyleInterface.
Definition at line 189 of file SymfonyStyle.php.
References SymfonyStyle\block().
progressAdvance | ( | $step = 1 | ) |
{Advances the progress output X steps.
int | $step | Number of steps to advance |
Implements StyleInterface.
Definition at line 275 of file SymfonyStyle.php.
References SymfonyStyle\getProgressBar().
progressFinish | ( | ) |
{Finishes the progress output.}
Implements StyleInterface.
Definition at line 283 of file SymfonyStyle.php.
References SymfonyStyle\getProgressBar(), and SymfonyStyle\newLine().
progressStart | ( | $max = 0 | ) |
{Starts the progress output.
int | $max | Maximum steps (0 if unknown) |
Implements StyleInterface.
Definition at line 266 of file SymfonyStyle.php.
References SymfonyStyle\createProgressBar().
|
private |
Definition at line 398 of file SymfonyStyle.php.
Referenced by SymfonyStyle\write(), and SymfonyStyle\writeln().
section | ( | $message | ) |
{Formats a section title.
string | $message |
Implements StyleInterface.
Definition at line 120 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependBlock(), SymfonyStyle\newLine(), and SymfonyStyle\writeln().
success | ( | $message | ) |
{Formats a success result bar.
string | array | $message |
Implements StyleInterface.
Definition at line 165 of file SymfonyStyle.php.
References SymfonyStyle\block().
table | ( | array | $headers, |
array | $rows | ||
) |
{Formats a table.
array | $headers | |
array | $rows |
Implements StyleInterface.
Definition at line 205 of file SymfonyStyle.php.
References SymfonyStyle\newLine().
text | ( | $message | ) |
{Formats informational text.
string | array | $message |
Implements StyleInterface.
Definition at line 147 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependText(), and SymfonyStyle\writeln().
title | ( | $message | ) |
{Formats a command title.
string | $message |
Implements StyleInterface.
Definition at line 107 of file SymfonyStyle.php.
References SymfonyStyle\autoPrependBlock(), SymfonyStyle\newLine(), and SymfonyStyle\writeln().
warning | ( | $message | ) |
{Formats an warning result bar.
string | array | $message |
Implements StyleInterface.
Definition at line 181 of file SymfonyStyle.php.
References SymfonyStyle\block().
write | ( | $messages, | |
$newline = false , |
|||
$type = self::OUTPUT_NORMAL |
|||
) |
{Writes a message to the output.
string | array | $messages | The message as an array of lines or a single string |
bool | $newline | Whether to add a newline |
int | $type | The type of output (one of the OUTPUT constants) |
\InvalidArgumentException | When unknown output type is given |
Implements OutputInterface.
Definition at line 343 of file SymfonyStyle.php.
References SymfonyStyle\reduceBuffer().
writeln | ( | $messages, | |
$type = self::OUTPUT_NORMAL |
|||
) |
{Writes a message to the output and adds a newline at the end.
string | array | $messages | The message as an array of lines of a single string |
int | $type | The type of output (one of the OUTPUT constants) |
\InvalidArgumentException | When unknown output type is given |
Implements OutputInterface.
Definition at line 334 of file SymfonyStyle.php.
References SymfonyStyle\reduceBuffer().
Referenced by SymfonyStyle\block(), SymfonyStyle\listing(), SymfonyStyle\section(), SymfonyStyle\text(), and SymfonyStyle\title().
|
private |
Definition at line 40 of file SymfonyStyle.php.
|
private |
Definition at line 36 of file SymfonyStyle.php.
Referenced by SymfonyStyle\__construct().
|
private |
Definition at line 39 of file SymfonyStyle.php.
|
private |
Definition at line 38 of file SymfonyStyle.php.
Referenced by SymfonyStyle\createProgressBar(), and SymfonyStyle\getProgressBar().
|
private |
Definition at line 37 of file SymfonyStyle.php.
const MAX_LINE_LENGTH = 120 |
Definition at line 34 of file SymfonyStyle.php.
Referenced by SymfonyStyleTest\testLongWordsBlockWrapping().