\Symfony\Component\Console\StyleStyleInterface

Output style helpers.

Summary

Methods
Constants
title()
section()
listing()
text()
success()
error()
warning()
note()
caution()
table()
ask()
askHidden()
confirm()
choice()
newLine()
progressStart()
progressAdvance()
progressFinish()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

title()

title(string  $message) 

Formats a command title.

Parameters

string $message

section()

section(string  $message) 

Formats a section title.

Parameters

string $message

listing()

listing(array  $elements) 

Formats a list.

Parameters

array $elements

text()

text(string|array  $message) 

Formats informational text.

Parameters

string|array $message

success()

success(string|array  $message) 

Formats a success result bar.

Parameters

string|array $message

error()

error(string|array  $message) 

Formats an error result bar.

Parameters

string|array $message

warning()

warning(string|array  $message) 

Formats an warning result bar.

Parameters

string|array $message

note()

note(string|array  $message) 

Formats a note admonition.

Parameters

string|array $message

caution()

caution(string|array  $message) 

Formats a caution admonition.

Parameters

string|array $message

table()

table(array  $headers, array  $rows) 

Formats a table.

Parameters

array $headers
array $rows

ask()

ask(string  $question, string|null  $default = null, callable|null  $validator = null) : mixed

Asks a question.

Parameters

string $question
string|null $default
callable|null $validator

Returns

mixed

askHidden()

askHidden(string  $question, callable|null  $validator = null) : mixed

Asks a question with the user input hidden.

Parameters

string $question
callable|null $validator

Returns

mixed

confirm()

confirm(string  $question, boolean  $default = true) : boolean

Asks for confirmation.

Parameters

string $question
boolean $default

Returns

boolean

choice()

choice(string  $question, array  $choices, string|integer|null  $default = null) : mixed

Asks a choice question.

Parameters

string $question
array $choices
string|integer|null $default

Returns

mixed

newLine()

newLine(integer  $count = 1) 

Add newline(s).

Parameters

integer $count

The number of newlines

progressStart()

progressStart(integer  $max) 

Starts the progress output.

Parameters

integer $max

Maximum steps (0 if unknown)

progressAdvance()

progressAdvance(integer  $step = 1) 

Advances the progress output X steps.

Parameters

integer $step

Number of steps to advance

progressFinish()

progressFinish() 

Finishes the progress output.