Formatter\OutputFormatterStyle (Component\Console)
Symfony\Component\Console\Formatter\OutputFormatterStyle
class OutputFormatterStyle implements OutputFormatterStyleInterface
Formatter style class for defining styles.
Methods
__construct(string|null $foreground = null, string|null $background = null, array $options = array()) Initializes output formatter style. | ||
setForeground(string|null $color = null) Sets style foreground color. | ||
setBackground(string|null $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 __construct(string|null $foreground = null, string|null $background = null, array $options = array())
Initializes output formatter style.
public setForeground(string|null $color = null)
Sets style foreground color.
public setBackground(string|null $color = null)
Sets style background color.
public setOption(string $option)
Sets some specific style option.
public unsetOption(string $option)
Unsets some specific style option.
public setOptions(array $options)
Sets multiple style options at once.
public string apply(string $text)
Applies the style to a given text.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Console/Formatter/OutputFormatterStyle.html