4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Console\Formatter;
15 * Formatter style interface for defining styles.
17 * @author Konstantin Kudryashov <ever.zet@gmail.com>
19 interface OutputFormatterStyleInterface
22 * Sets style foreground color.
24 * @param string $color The color name
26 public function setForeground($color = null);
29 * Sets style background color.
31 * @param string $color The color name
33 public function setBackground($color = null);
36 * Sets some specific style option.
38 * @param string $option The option name
40 public function setOption($option);
43 * Unsets some specific style option.
45 * @param string $option The option name
47 public function unsetOption($option);
50 * Sets multiple style options at once.
52 public function setOptions(array $options);
55 * Applies the style to a given text.
57 * @param string $text The text to style
61 public function apply($text);