You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

3 years ago
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\Formatter;
  11. /**
  12. * Formatter style interface for defining styles.
  13. *
  14. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  15. */
  16. interface OutputFormatterStyleInterface
  17. {
  18. /**
  19. * Sets style foreground color.
  20. */
  21. public function setForeground(string $color = null);
  22. /**
  23. * Sets style background color.
  24. */
  25. public function setBackground(string $color = null);
  26. /**
  27. * Sets some specific style option.
  28. */
  29. public function setOption(string $option);
  30. /**
  31. * Unsets some specific style option.
  32. */
  33. public function unsetOption(string $option);
  34. /**
  35. * Sets multiple style options at once.
  36. */
  37. public function setOptions(array $options);
  38. /**
  39. * Applies the style to a given text.
  40. *
  41. * @return string
  42. */
  43. public function apply(string $text);
  44. }