當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OutputFormatter::__construct方法代碼示例

本文整理匯總了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'));
 }
開發者ID:duxor,項目名稱:GUSLE,代碼行數:31,代碼來源:Formatter.php

示例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);
     }
 }
開發者ID:aloframework,項目名稱:handlers,代碼行數:13,代碼來源:OutputFormatter.php

示例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'));
 }
開發者ID:glynnforrest,項目名稱:neptune,代碼行數:9,代碼來源:OutputFormatter.php

示例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')));
 }
開發者ID:akeneo,項目名稱:php-coupling-detector,代碼行數:15,代碼來源:OutputFormatter.php

示例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'));
 }
開發者ID:deborahvandervegt,項目名稱:accompli,代碼行數:24,代碼來源:OutputFormatter.php

示例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));
 }
開發者ID:kingsj,項目名稱:core,代碼行數:7,代碼來源:OutputFormatter.php

示例7: __construct

 /**
  * @param array $styles Array of "name => FormatterStyle" instances
  */
 public function __construct(array $styles = array())
 {
     parent::__construct(true, $styles);
 }
開發者ID:bookin,項目名稱:yii2-composer-web,代碼行數:7,代碼來源:BootstrapOutputFormatter.php

示例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'))));
 }
開發者ID:Elsensee,項目名稱:phpbb-translation-validator,代碼行數:4,代碼來源:OutputFormatter.php

示例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')));
 }
開發者ID:bonndan,項目名稱:release-manager,代碼行數:4,代碼來源:Formatter.php

示例10: __construct

 public function __construct()
 {
     parent::__construct(NULL, $this->getStyles());
 }
開發者ID:nunodotferreira,項目名稱:ApiGen,代碼行數:4,代碼來源:OutputFormatter.php

示例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());
 }
開發者ID:RapotOR,項目名稱:ConsoleBundle,代碼行數:14,代碼來源:OutputFormatterHtml.php

示例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);
 }
開發者ID:vanslambrouckd,項目名稱:geotools,代碼行數:9,代碼來源:OutputFormatter.php

示例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));
 }
開發者ID:zroger,項目名稱:feather,代碼行數:7,代碼來源:OutputFormatter.php


注:本文中的Symfony\Component\Console\Formatter\OutputFormatter::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。