Beispiel #1
0
 /**
  * KernelOutput constructor.
  * @param ExecuteAction $executeAction
  * @param LoggerInterface $logger
  */
 public function __construct(ExecuteAction $executeAction, LoggerInterface $logger)
 {
     $this->executeAction = $executeAction;
     $this->logger = $logger;
     $this->formatter = new OutputFormatter();
     $this->formatter->setDecorated(true);
     $this->initFormatters();
 }
Beispiel #2
0
 public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
 {
     $isDecorated = $formatter->isDecorated();
     $formatter->setDecorated(false);
     $string = $formatter->format($string);
     $string = preg_replace("/\\[[^m]*m/", '', $string);
     $formatter->setDecorated($isDecorated);
     return self::strlen($string);
 }
 /**
  * {@inheritdoc}
  */
 public function setDecorated($decorated)
 {
     return $this->formatter->setDecorated($decorated);
 }