Constants

MAX_LINE_LENGTH

MAX_LINE_LENGTH = 120

Properties

$output

$output : 

Type

$input

$input : 

Type

$questionHelper

$questionHelper : 

Type

$progressBar

$progressBar : 

Type

$lineLength

$lineLength : 

Type

$bufferedOutput

$bufferedOutput : 

Type

Methods

newLine()

newLine(integer  $count = 1) 

Add newline(s).

Parameters

integer $count

The number of newlines

createProgressBar()

createProgressBar(integer  $max) : \Symfony\Component\Console\Helper\ProgressBar

Parameters

integer $max

Returns

\Symfony\Component\Console\Helper\ProgressBar

write()

write(string|\Symfony\Component\Console\Output\iterable  $messages, boolean  $newline = false,   $type = self::OUTPUT_NORMAL) 

Writes a message to the output.

Parameters

string|\Symfony\Component\Console\Output\iterable $messages

The message as an iterable of strings or a single string

boolean $newline

Whether to add a newline

$type

writeln()

writeln(string|\Symfony\Component\Console\Output\iterable  $messages,   $type = self::OUTPUT_NORMAL) 

Writes a message to the output and adds a newline at the end.

Parameters

string|\Symfony\Component\Console\Output\iterable $messages

The message as an iterable of strings or a single string

$type

setVerbosity()

setVerbosity(integer  $level) 

Sets the verbosity of the output.

Parameters

integer $level

The level of verbosity (one of the VERBOSITY constants)

getVerbosity()

getVerbosity() : integer

Gets the current verbosity of the output.

Returns

integer —

The current level of verbosity (one of the VERBOSITY constants)

setDecorated()

setDecorated(boolean  $decorated) 

Sets the decorated flag.

Parameters

boolean $decorated

Whether to decorate the messages

isDecorated()

isDecorated() : boolean

Gets the decorated flag.

Returns

boolean —

true if the output will decorate messages, false otherwise

isQuiet()

isQuiet() : boolean

Returns whether verbosity is quiet (-q).

Returns

boolean —

true if verbosity is set to VERBOSITY_QUIET, false otherwise

isVerbose()

isVerbose() : boolean

Returns whether verbosity is verbose (-v).

Returns

boolean —

true if verbosity is set to VERBOSITY_VERBOSE, false otherwise

isVeryVerbose()

isVeryVerbose() : boolean

Returns whether verbosity is very verbose (-vv).

Returns

boolean —

true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise

isDebug()

isDebug() : boolean

Returns whether verbosity is debug (-vvv).

Returns

boolean —

true if verbosity is set to VERBOSITY_DEBUG, false otherwise

block()

block(string|array  $messages, string|null  $type = null, string|null  $style = null, string  $prefix = ' ', boolean  $padding = false, boolean  $escape = true) 

Formats a message as a block of text.

Parameters

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

boolean $padding

Whether to add vertical padding

boolean $escape

Whether to escape the message

title()

title(  $message) 

{@inheritdoc}

Parameters

$message

section()

section(  $message) 

{@inheritdoc}

Parameters

$message

listing()

listing(array  $elements) 

{@inheritdoc}

Parameters

array $elements

text()

text(  $message) 

{@inheritdoc}

Parameters

$message

comment()

comment(string|array  $message) 

Formats a command comment.

Parameters

string|array $message

success()

success(  $message) 

{@inheritdoc}

Parameters

$message

error()

error(  $message) 

{@inheritdoc}

Parameters

$message

warning()

warning(  $message) 

{@inheritdoc}

Parameters

$message

note()

note(  $message) 

{@inheritdoc}

Parameters

$message

caution()

caution(  $message) 

{@inheritdoc}

Parameters

$message

table()

table(array  $headers, array  $rows) 

{@inheritdoc}

Parameters

array $headers
array $rows

ask()

ask(  $question,   $default = null,   $validator = null) 

{@inheritdoc}

Parameters

$question
$default
$validator

askHidden()

askHidden(  $question,   $validator = null) 

{@inheritdoc}

Parameters

$question
$validator

confirm()

confirm(  $question,   $default = true) 

{@inheritdoc}

Parameters

$question
$default

choice()

choice(  $question, array  $choices,   $default = null) 

{@inheritdoc}

Parameters

$question
array $choices
$default

progressStart()

progressStart(  $max) 

{@inheritdoc}

Parameters

$max

progressAdvance()

progressAdvance(  $step = 1) 

{@inheritdoc}

Parameters

$step

progressFinish()

progressFinish() 

{@inheritdoc}

getErrorStyle()

getErrorStyle() : self

Returns a new instance which makes use of stderr if available.

Returns

self

getErrorOutput()

getErrorOutput() 

getProgressBar()

getProgressBar() 

autoPrependBlock()

autoPrependBlock() 

autoPrependText()

autoPrependText() 

writeBuffer()

writeBuffer(\Symfony\Component\Console\Style\string  $message, \Symfony\Component\Console\Style\bool  $newLine, \Symfony\Component\Console\Style\int  $type) 

Parameters

\Symfony\Component\Console\Style\string $message
\Symfony\Component\Console\Style\bool $newLine
\Symfony\Component\Console\Style\int $type

createBlock()

createBlock(\Symfony\Component\Console\Style\iterable  $messages, \Symfony\Component\Console\Style\string  $type = null, \Symfony\Component\Console\Style\string  $style = null, \Symfony\Component\Console\Style\string  $prefix = ' ', \Symfony\Component\Console\Style\bool  $padding = false, \Symfony\Component\Console\Style\bool  $escape = false) 

Parameters

\Symfony\Component\Console\Style\iterable $messages
\Symfony\Component\Console\Style\string $type
\Symfony\Component\Console\Style\string $style
\Symfony\Component\Console\Style\string $prefix
\Symfony\Component\Console\Style\bool $padding
\Symfony\Component\Console\Style\bool $escape