Initializes console output formatter.
public __construct ( boolean $decorated = false, array $styles = [] ) | ||
$decorated | boolean | Whether this formatter should actually decorate strings |
$styles | array | Array of "name => FormatterStyle" instances |
/** * @param boolean $decorated * * @param array $styles */ public function __construct($decorated = false, array $styles = array()) { parent::__construct($decorated, $styles); $this->setStyle('pending', new OutputFormatterStyle('yellow')); $this->setStyle('pending-bg', new OutputFormatterStyle('black', 'yellow', array('bold'))); $this->setStyle('skipped', new OutputFormatterStyle('cyan')); $this->setStyle('skipped-bg', new OutputFormatterStyle('white', 'cyan', array('bold'))); $this->setStyle('failed', new OutputFormatterStyle('red')); $this->setStyle('failed-bg', new OutputFormatterStyle('white', 'red', array('bold'))); $this->setStyle('broken', new OutputFormatterStyle('magenta')); $this->setStyle('broken-bg', new OutputFormatterStyle('white', 'magenta', array('bold'))); $this->setStyle('passed', new OutputFormatterStyle('green')); $this->setStyle('passed-bg', new OutputFormatterStyle('black', 'green', array('bold'))); $this->setStyle('value', new OutputFormatterStyle('yellow')); $this->setStyle('lineno', new OutputFormatterStyle(null, 'black')); $this->setStyle('code', new OutputFormatterStyle('white')); $this->setStyle('hl', new OutputFormatterStyle('black', 'yellow', array('bold'))); $this->setStyle('question', new OutputFormatterStyle('black', 'yellow', array('bold'))); $this->setStyle('trace', new OutputFormatterStyle()); $this->setStyle('trace-class', new OutputFormatterStyle('cyan')); $this->setStyle('trace-func', new OutputFormatterStyle('cyan')); $this->setStyle('trace-type', new OutputFormatterStyle()); $this->setStyle('trace-args', new OutputFormatterStyle()); $this->setStyle('diff-add', new OutputFormatterStyle('green')); $this->setStyle('diff-del', new OutputFormatterStyle('red')); }
/** * Constructor * * @author Art <*****@*****.**> */ public function __construct() { parent::__construct(); self::initStyles(); foreach (self::$styles as $code => $class) { $this->setStyle($code, $class); } }
public function __construct($decorated = false, array $styles = array()) { parent::__construct(true, $styles); $this->setStyle('logo', new OutputFormatterStyle('magenta')); $this->setStyle('error', new OutputFormatterStyle('white', 'red')); $this->setStyle('comment', new OutputFormatterStyle('magenta', null, array('underscore'))); $this->setStyle('info', new OutputFormatterStyle('cyan')); $this->setStyle('question', new OutputFormatterStyle('black', 'cyan')); }
/** * OutputFormatter constructor. * * @param bool $decorated * @param array $styles */ public function __construct($decorated = false, array $styles = array()) { parent::__construct($decorated, $styles); $this->setStyle('passed', new OutputFormatterStyle('green', null, array())); $this->setStyle('passed-bg', new OutputFormatterStyle('black', 'green', array('bold'))); $this->setStyle('broken', new OutputFormatterStyle('red', null, array())); $this->setStyle('broken-bg', new OutputFormatterStyle('white', 'red', array('bold'))); $this->setStyle('blink', new OutputFormatterStyle(null, null, array('blink'))); }
/** * Constructs a new OutputFormatter. * * @param bool $decorated * @param OutputFormatterStyleInterface[] $styles */ public function __construct($decorated = false, array $styles = array()) { parent::__construct($decorated, $styles); $this->setStyle('title', new OutputFormatterStyle()); $this->setStyle(LogLevel::EMERGENCY, new OutputFormatterStyle('white', 'red')); $this->setStyle(LogLevel::CRITICAL, new OutputFormatterStyle('white', 'red')); $this->setStyle(LogLevel::ALERT, new OutputFormatterStyle('white', 'red')); $this->setStyle(LogLevel::ERROR, new OutputFormatterStyle('white', 'red')); $this->setStyle(LogLevel::WARNING, new OutputFormatterStyle('white', 'red')); $this->setStyle(LogLevel::NOTICE, new OutputFormatterStyle()); $this->setStyle(LogLevel::INFO, new OutputFormatterStyle('black', 'yellow')); $this->setStyle(LogLevel::DEBUG, new OutputFormatterStyle()); $this->setStyle('event-name', new OutputFormatterStyle('yellow')); $this->setStyle('event-task-name', new OutputFormatterStyle('yellow')); $this->setStyle('event-task-action-in_progress', new OutputFormatterStyle()); $this->setStyle('event-task-action-failed', new OutputFormatterStyle('red')); $this->setStyle('event-task-action-completed', new OutputFormatterStyle('green')); }
/** * {@inheritdoc} */ public function __construct($decorated = null, array $styles = array()) { parent::__construct($decorated, array_merge(array('undefined' => new OutputFormatterStyle('yellow'), 'pending' => new OutputFormatterStyle('yellow'), 'pending_param' => new OutputFormatterStyle('yellow', null, array('bold')), 'failed' => new OutputFormatterStyle('red'), 'failed_param' => new OutputFormatterStyle('red', null, array('bold')), 'passed' => new OutputFormatterStyle('green'), 'passed_param' => new OutputFormatterStyle('green', null, array('bold')), 'skipped' => new OutputFormatterStyle('cyan'), 'skipped_param' => new OutputFormatterStyle('cyan', null, array('bold')), 'comment' => new OutputFormatterStyle('black'), 'tag' => new OutputFormatterStyle('cyan')), $styles)); }
/** * @param array $styles Array of "name => FormatterStyle" instances */ public function __construct(array $styles = array()) { parent::__construct(true, $styles); }
public function __construct($decorated = false, array $styles = array()) { parent::__construct($decorated, array_merge($styles, array('success' => new OutputFormatterStyle('black', 'green'), 'notice' => new OutputFormatterStyle('cyan'), 'noticebg' => new OutputFormatterStyle('black', 'cyan'), 'warning' => new OutputFormatterStyle('yellow'), 'error' => new OutputFormatterStyle('red'), 'fatal' => new OutputFormatterStyle('white', 'red')))); }
public function __construct($decorated = null, array $styles = array()) { parent::__construct(true, array('error' => new OutputFormatterStyle('white', 'red'), 'green' => new OutputFormatterStyle('green'), 'yellow' => new OutputFormatterStyle('yellow'), 'question' => new OutputFormatterStyle('black', 'cyan'))); }
public function __construct() { parent::__construct(NULL, $this->getStyles()); }
/** * Initializes console output formatter. * * @param Boolean $decorated Whether this formatter should actually decorate strings * @param array $styles Array of "name => FormatterStyle" instance * * @api */ public function __construct($decorated = null, array $styles = array()) { $styles = array_merge(array('error' => new OutputFormatterStyleHtml('white', 'red'), 'info' => new OutputFormatterStyleHtml('green'), 'comment' => new OutputFormatterStyleHtml('yellow'), 'question' => new OutputFormatterStyleHtml('black', 'cyan')), $styles); parent::__construct($decorated, $styles); $this->getStyleStack()->setEmptyStyle(new OutputFormatterStyleHtml()); }
/** * {@inheritdoc} */ public function __construct($decorated = false, array $styles = array()) { $this->setStyle('label', new OutputFormatterStyle('yellow', 'black')); $this->setStyle('value', new OutputFormatterStyle('green', 'black')); parent::__construct($decorated, $styles); }
/** * {@inheritdoc} */ public function __construct($decorated = null, array $styles = array()) { parent::__construct($decorated, array_merge(array('emergency' => new OutputFormatterStyle('red'), 'alert' => new OutputFormatterStyle('red'), 'critical' => new OutputFormatterStyle('red'), 'error' => new OutputFormatterStyle('red'), 'warning' => new OutputFormatterStyle('yellow'), 'notice' => new OutputFormatterStyle('cyan'), 'info' => new OutputFormatterStyle('cyan'), 'debug' => new OutputFormatterStyle('blue')), $styles)); }