Symfony\Component\Console\Formatter\OutputFormatter::getStyleStack PHP Method

getStyleStack() public method

public getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack
return Symfony\Component\Console\Formatter\OutputFormatterStyleStack
    public function getStyleStack()
    {
        return $this->styleStack;
    }

Usage Example

コード例 #1
0
ファイル: AnsiFormatter.php プロジェクト: webmozart/console
 /**
  * {@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;
 }