getStyleStack() public method

public getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack
return Symfony\Component\Console\Formatter\OutputFormatterStyleStack
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function format($string, Style $style = null)
 {
     if (null !== $style) {
         $this->innerFormatter->getStyleStack()->push(StyleConverter::convert($style));
     }
     $formatted = $this->innerFormatter->format($string);
     if (null !== $style) {
         $this->innerFormatter->getStyleStack()->pop();
     }
     return $formatted;
 }