interface OutputFormatterStyleInterface

Formatter style interface for defining styles.

Methods

void
setForeground(string|null$color)

Sets style foreground color.

void
setBackground(string|null$color)

Sets style background color.

void
setOption(string$option)

Sets some specific style option.

void
unsetOption(string$option)

Unsets some specific style option.

void
setOptions(array$options)

Sets multiple style options at once.

string
apply(string$text)

Applies the style to a given text.

Details

void setForeground(string|null$color)

Sets style foreground color.

Parameters

string|null $color

Return Value

void

void setBackground(string|null$color)

Sets style background color.

Parameters

string|null $color

Return Value

void

void setOption(string$option)

Sets some specific style option.

Parameters

string $option

Return Value

void

void unsetOption(string$option)

Unsets some specific style option.

Parameters

string $option

Return Value

void

void setOptions(array$options)

Sets multiple style options at once.

Parameters

array $options

Return Value

void

string apply(string$text)

Applies the style to a given text.

Parameters

string $text

Return Value

string