OutputFormatterStyle
class OutputFormatterStyle implements OutputFormatterStyleInterface
Formatter style class for defining styles.
Methods
__construct(string|null $foreground = null, string|null $background = null, array $options = array())
Initializes output formatter style.
setForeground(string $color = null)
Sets style foreground color.
setBackground(string $color = null)
Sets style background color.
setOption(string $option)
Sets some specific style option.
unsetOption(string $option)
Unsets some specific style option.
setOptions(array $options)
Sets multiple style options at once.
string
apply(string $text)
Applies the style to a given text.
Details
at line line 64
__construct(string|null $foreground = null, string|null $background = null, array $options = array())
Initializes output formatter style.
at line line 84
setForeground(string $color = null)
Sets style foreground color.
at line line 110
setBackground(string $color = null)
Sets style background color.
at line line 136
setOption(string $option)
Sets some specific style option.
at line line 158
unsetOption(string $option)
Unsets some specific style option.
at line line 179
setOptions(array $options)
Sets multiple style options at once.
at line line 195
string
apply(string $text)
Applies the style to a given text.