You are here

public function OutputFormatterStyle::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Formatter/OutputFormatterStyle.php \Symfony\Component\Console\Formatter\OutputFormatterStyle::__construct()

Initializes output formatter style.

Parameters

string|null $foreground The style foreground color name:

string|null $background The style background color name:

array $options The style options:

File

vendor/symfony/console/Formatter/OutputFormatterStyle.php, line 62

Class

OutputFormatterStyle
Formatter style class for defining styles.

Namespace

Symfony\Component\Console\Formatter

Code

public function __construct($foreground = null, $background = null, array $options = array()) {
  if (null !== $foreground) {
    $this
      ->setForeground($foreground);
  }
  if (null !== $background) {
    $this
      ->setBackground($background);
  }
  if (count($options)) {
    $this
      ->setOptions($options);
  }
}