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>
21 interface OutputFormatterStyleInterface
24 * Sets style foreground color.
26 * @param string $color The color name
30 public function setForeground($color = null);
33 * Sets style background color.
35 * @param string $color The color name
39 public function setBackground($color = null);
42 * Sets some specific style option.
44 * @param string $option The option name
48 public function setOption($option);
51 * Unsets some specific style option.
53 * @param string $option The option name
55 public function unsetOption($option);
58 * Sets multiple style options at once.
60 * @param array $options
62 public function setOptions(array $options);
65 * Applies the style to a given text.
67 * @param string $text The text to style
71 public function apply($text);