OutputFormatterStyleStack

class OutputFormatterStyleStack Methods __construct(OutputFormatterStyleInterface $emptyStyle = null) Constructor. reset() Resets stack (ie. empty internal arrays). push(OutputFormatterStyleInterface $style) Pushes a style in the stack. OutputFormatterStyleInterface pop(OutputFormatterStyleInterface $style = null) Pops a style from the stack. OutputFormatterStyle getCurrent() Computes current style with stacks top codes. OutputFormatterStyleStack setEmptyStyle(Outp

OutputFormatterStyleInterface::unsetOption()

unsetOption(string $option) Unsets some specific style option. Parameters string $option The option name

OutputFormatterStyleInterface::setOptions()

setOptions(array $options) Sets multiple style options at once. Parameters array $options

OutputFormatterStyleInterface::setOption()

setOption(string $option) Sets some specific style option. Parameters string $option The option name

OutputFormatterStyleInterface::setForeground()

setForeground(string $color = null) Sets style foreground color. Parameters string $color The color name

OutputFormatterStyleInterface::setBackground()

setBackground(string $color = null) Sets style background color. Parameters string $color The color name

OutputFormatterStyleInterface::apply()

string apply(string $text) Applies the style to a given text. Parameters string $text The text to style Return Value string

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

OutputFormatterStyle::unsetOption()

unsetOption(string $option) Unsets some specific style option. Parameters string $option The option name Exceptions InvalidArgumentException When the option name isn't defined

OutputFormatterStyle::setOptions()

setOptions(array $options) Sets multiple style options at once. Parameters array $options