W3cubDocs

/Symfony 2.8

Symfony\Component\Console\Formatter\OutputFormatterStyleInterface

interface OutputFormatterStyleInterface

Formatter style interface for defining styles.

Methods

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

public setForeground(string $color = null)

Sets style foreground color.

Parameters

string $color The color name

public setBackground(string $color = null)

Sets style background color.

Parameters

string $color The color name

public setOption(string $option)

Sets some specific style option.

Parameters

string $option The option name

public unsetOption(string $option)

Unsets some specific style option.

Parameters

string $option The option name

public setOptions(array $options)

Sets multiple style options at once.

Parameters

array $options

public string apply(string $text)

Applies the style to a given text.

Parameters

string $text The text to style

Return Value

string

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.html