Exemple #1
0
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     // Use our own formatter
     parent::__construct($verbosity, $decorated, $formatter);
     // set some custom styles
     $this->getFormatter()->setStyle('error', new OutputFormatterStyle('white', 'red'));
     $this->getFormatter()->setStyle('green', new OutputFormatterStyle('green'));
     $this->getFormatter()->setStyle('yellow', new OutputFormatterStyle('yellow'));
     $this->getFormatter()->setStyle('question', new OutputFormatterStyle('black', 'cyan'));
     $this->getFormatter()->setStyle('title', new OutputFormatterStyle('white', 'blue'));
 }
Exemple #2
0
 function __construct($config)
 {
     $this->config = array_merge($this->config, $config);
     $formatter = new OutputFormatter($this->config['colors']);
     $formatter->setStyle('bold', new OutputFormatterStyle(null, null, array('bold')));
     $formatter->setStyle('focus', new OutputFormatterStyle('magenta', null, array('bold')));
     $formatter->setStyle('ok', new OutputFormatterStyle('white', 'magenta'));
     $formatter->setStyle('error', new OutputFormatterStyle('white', 'red'));
     $formatter->setStyle('debug', new OutputFormatterStyle('cyan'));
     $formatter->setStyle('info', new OutputFormatterStyle('yellow'));
     $this->formatHelper = new FormatterHelper();
     parent::__construct($this->config['verbosity'], $this->config['colors'], $formatter);
 }
 /**
  * Construct a ShellOutput instance.
  *
  * @param mixed $verbosity (default: self::VERBOSITY_NORMAL)
  * @param bool $decorated (default: null)
  * @param OutputFormatterInterface $formatter (default: null)
  * @param null|string|OutputPager $pager (default: null)
  */
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null, $pager = null)
 {
     parent::__construct($verbosity, $decorated, $formatter);
     $this->initFormatters();
     if ($pager === null) {
         $this->pager = new PassthruPager($this);
     } elseif (is_string($pager)) {
         $this->pager = new ProcOutputPager($this, $pager);
     } elseif ($pager instanceof OutputPager) {
         $this->pager = $pager;
     } else {
         throw new \InvalidArgumentException('Unexpected pager parameter: ' . $pager);
     }
 }
Exemple #4
0
 function __construct($config)
 {
     $this->config = array_merge($this->config, $config);
     // enable interactive output mode for CLI
     $this->isInteractive = $this->config['interactive'] && isset($_SERVER['TERM']) && php_sapi_name() == 'cli' && $_SERVER['TERM'] != 'linux';
     $formatter = new OutputFormatter($this->config['colors']);
     $formatter->setStyle('bold', new OutputFormatterStyle(null, null, array('bold')));
     $formatter->setStyle('focus', new OutputFormatterStyle('magenta', null, array('bold')));
     $formatter->setStyle('ok', new OutputFormatterStyle('white', 'magenta'));
     $formatter->setStyle('error', new OutputFormatterStyle('white', 'red'));
     $formatter->setStyle('debug', new OutputFormatterStyle('cyan'));
     $formatter->setStyle('info', new OutputFormatterStyle('yellow'));
     $this->formatHelper = new FormatterHelper();
     parent::__construct($this->config['verbosity'], $this->config['colors'], $formatter);
 }
Exemple #5
0
 /**
  * {@inheritdoc}
  */
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     parent::__construct($verbosity, $decorated, $formatter);
 }
 public function __construct(LoggerInterface $logger)
 {
     $this->logger = $logger;
     parent::__construct();
 }
Exemple #7
0
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     // Use our own formatter
     parent::__construct($verbosity, $decorated, new Formatter());
 }
 /**
  * Constructor.
  *
  * @author Art <*****@*****.**>
  */
 public function __construct()
 {
     parent::__construct(self::VERBOSITY_NORMAL, null, new OutputFormatter());
 }