Documentation

OutputFormatterStyleInterface
in

Formatter style interface for defining styles.

Tags
author

Konstantin Kudryashov ever.zet@gmail.com

Table of Contents

apply()  : string
Applies the style to a given text.
setBackground()  : mixed
Sets style background color.
setForeground()  : mixed
Sets style foreground color.
setOption()  : mixed
Sets some specific style option.
setOptions()  : mixed
Sets multiple style options at once.
unsetOption()  : mixed
Unsets some specific style option.

Methods

apply()

Applies the style to a given text.

public apply(string $text) : string
Parameters
$text : string
Return values
string

setBackground()

Sets style background color.

public setBackground([string $color = null ]) : mixed
Parameters
$color : string = null
Return values
mixed

setForeground()

Sets style foreground color.

public setForeground([string $color = null ]) : mixed
Parameters
$color : string = null
Return values
mixed

setOption()

Sets some specific style option.

public setOption(string $option) : mixed
Parameters
$option : string
Return values
mixed

setOptions()

Sets multiple style options at once.

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Return values
mixed

unsetOption()

Unsets some specific style option.

public unsetOption(string $option) : mixed
Parameters
$option : string
Return values
mixed

Search results