class OutputFormatterStyle implements OutputFormatterStyleInterface
Formatter style class for defining styles.
| __construct(string $foreground = null, string $background = null, array $options = array()) Initializes output formatter style. | ||
| 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. |
Initializes output formatter style.
| string | $foreground | The style foreground color name |
| string | $background | The style background color name |
| array | $options | The style options |
Sets style foreground color.
| string | $color | The color name |
| InvalidArgumentException | When the color name isn't defined |
Sets style background color.
| string | $color | The color name |
| InvalidArgumentException | When the color name isn't defined |
Sets some specific style option.
| string | $option | The option name |
| InvalidArgumentException | When the option name isn't defined |
Unsets some specific style option.
| string | $option | The option name |
| InvalidArgumentException | When the option name isn't defined |
Sets multiple style options at once.
| array | $options |
Applies the style to a given text.
| string | $text | The text to style |
| string |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Formatter/OutputFormatterStyle.html