本文整理汇总了PHP中Symfony\Component\Console\Formatter\OutputFormatter::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP OutputFormatter::__construct方法的具体用法?PHP OutputFormatter::__construct怎么用?PHP OutputFormatter::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Console\Formatter\OutputFormatter
的用法示例。
在下文中一共展示了OutputFormatter::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @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'));
}
示例2: __construct
/**
* Constructor
*
* @author Art <a.molcanovas@gmail.com>
*/
public function __construct()
{
parent::__construct();
self::initStyles();
foreach (self::$styles as $code => $class) {
$this->setStyle($code, $class);
}
}
示例3: __construct
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'));
}
示例4: __construct
/**
* 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')));
}
示例5: __construct
/**
* 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'));
}
示例6: __construct
/**
* {@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));
}
示例7: __construct
/**
* @param array $styles Array of "name => FormatterStyle" instances
*/
public function __construct(array $styles = array())
{
parent::__construct(true, $styles);
}
示例8: __construct
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'))));
}
示例9: __construct
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')));
}
示例10: __construct
public function __construct()
{
parent::__construct(NULL, $this->getStyles());
}
示例11: __construct
/**
* 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());
}
示例12: __construct
/**
* {@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);
}
示例13: __construct
/**
* {@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));
}