\app\framework\Component\Console\Output\FormatterOutputFormatterStyleInterface

Formatter style interface for defining styles.

Summary

Methods
Constants
setForeground()
setBackground()
setOption()
unsetOption()
setOptions()
apply()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setForeground()

setForeground(string  $color = null) 

Sets style foreground color.

Parameters

string $color

The color name

setBackground()

setBackground(string  $color = null) 

Sets style background color.

Parameters

string $color

The color name

setOption()

setOption(string  $option) 

Sets some specific style option.

Parameters

string $option

The option name

unsetOption()

unsetOption(string  $option) 

Unsets some specific style option.

Parameters

string $option

The option name

setOptions()

setOptions(array  $options) 

Sets multiple style options at once.

Parameters

array $options

apply()

apply(string  $text) : string

Applies the style to a given text.

Parameters

string $text

The text to style

Returns

string