OutputFormatterStyleInterface
in
Formatter style interface for defining styles.
Tags
Table of Contents
Methods
- apply() : string
- Applies the style to a given text.
- setBackground() : void
- Sets style background color.
- setForeground() : void
- Sets style foreground color.
- setOption() : void
- Sets some specific style option.
- setOptions() : void
- Sets multiple style options at once.
- unsetOption() : void
- Unsets some specific style option.
Methods
apply()
Applies the style to a given text.
public
apply(string $text) : string
Parameters
- $text : string
Return values
stringsetBackground()
Sets style background color.
public
setBackground(string|null $color) : void
Parameters
- $color : string|null
setForeground()
Sets style foreground color.
public
setForeground(string|null $color) : void
Parameters
- $color : string|null
setOption()
Sets some specific style option.
public
setOption(string $option) : void
Parameters
- $option : string
setOptions()
Sets multiple style options at once.
public
setOptions(array<string|int, mixed> $options) : void
Parameters
- $options : array<string|int, mixed>
unsetOption()
Unsets some specific style option.
public
unsetOption(string $option) : void
Parameters
- $option : string