You are here

public function OutputFormatter::getStyle in Zircon Profile 8

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

Gets style options from style with specified name.

Parameters

string $name:

Return value

OutputFormatterStyleInterface

Throws

\InvalidArgumentException When style isn't defined

Overrides OutputFormatterInterface::getStyle

File

vendor/symfony/console/Formatter/OutputFormatter.php, line 111

Class

OutputFormatter
Formatter class for console output.

Namespace

Symfony\Component\Console\Formatter

Code

public function getStyle($name) {
  if (!$this
    ->hasStyle($name)) {
    throw new \InvalidArgumentException(sprintf('Undefined style: %s', $name));
  }
  return $this->styles[strtolower($name)];
}