Methods summary
public
|
|
public
|
#
block( string|array $messages, string|null $type = null, string|null $style = null, string $prefix = ' ', boolean $padding = false )
Formats a message as a block of text.
Formats a message as a block of text.
Parameters
- $messages
- The message to write in the block
- $type
- The block type (added in [] on first line)
- $style
- The style to apply to the whole block
- $prefix
- The prefix for the block
- $padding
- Whether to add vertical padding
|
public
|
#
title( string $message )
Formats a command title.
Parameters
|
public
|
#
section( string $message )
Formats a section title.
Parameters
|
public
|
#
listing( array $elements )
Formats a list.
Parameters
|
public
|
#
text( string|array $message )
Formats informational text.
Formats informational text.
Parameters
|
public
|
#
success( string|array $message )
Formats a success result bar.
Formats a success result bar.
Parameters
|
public
|
#
error( string|array $message )
Formats an error result bar.
Formats an error result bar.
Parameters
|
public
|
#
warning( string|array $message )
Formats an warning result bar.
Formats an warning result bar.
Parameters
|
public
|
#
note( string|array $message )
Formats a note admonition.
Formats a note admonition.
Parameters
|
public
|
#
caution( string|array $message )
Formats a caution admonition.
Formats a caution admonition.
Parameters
|
public
|
#
table( array $headers, array $rows )
Formats a table.
Parameters
|
public
string
|
#
ask( string $question, string|null $default = null, callable|null $validator = null )
Asks a question.
Parameters
- $question
- $default
- $validator
Returns
string
|
public
string
|
#
askHidden( string $question, callable|null $validator = null )
Asks a question with the user input hidden.
Asks a question with the user input hidden.
Parameters
Returns
string
|
public
boolean
|
#
confirm( string $question, boolean $default = true )
Asks for confirmation.
Parameters
Returns
boolean
|
public
string
|
#
choice( string $question, array $choices, string|integer|null $default = null )
Asks a choice question.
Parameters
- $question
- $choices
- $default
Returns
string
|
public
|
#
progressStart( integer $max = 0 )
Starts the progress output.
Starts the progress output.
Parameters
- $max
- Maximum steps (0 if unknown)
|
public
|
#
progressAdvance( integer $step = 1 )
Advances the progress output X steps.
Advances the progress output X steps.
Parameters
- $step
- Number of steps to advance
|
public
|
#
progressFinish( )
Finishes the progress output.
Finishes the progress output.
|
public
Symfony\Component\Console\Helper\ProgressBar
|
|
public
string
|
|
public
|
#
writeln( string|array $messages, integer $type = self::OUTPUT_NORMAL )
Writes a message to the output and adds a newline at the end.
Writes a message to the output and adds a newline at the end.
Parameters
- $messages
- The message as an array of lines of a single string
- $type
- $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
Overrides
|
public
|
#
write( string|array $messages, boolean $newline = false, integer $type = self::OUTPUT_NORMAL )
Writes a message to the output.
Writes a message to the output.
Parameters
- $messages
- The message as an array of lines or a single string
- $newline
- Whether to add a newline
- $type
- $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
Overrides
|
public
|
#
newLine( integer $count = 1 )
Add newline(s).
Parameters
- $count
- The number of newlines
Overrides
|