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


PHP ConsoleOutput::__construct方法代碼示例

本文整理匯總了PHP中Symfony\Component\Console\Output\ConsoleOutput::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConsoleOutput::__construct方法的具體用法?PHP ConsoleOutput::__construct怎麽用?PHP ConsoleOutput::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Console\Output\ConsoleOutput的用法示例。


在下文中一共展示了ConsoleOutput::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 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'));
 }
開發者ID:liip,項目名稱:rmt,代碼行數:11,代碼來源:Output.php

示例2: OutputFormatter

 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);
 }
開發者ID:Eli-TW,項目名稱:Codeception,代碼行數:13,代碼來源:Output.php

示例3: __construct

 /**
  * 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);
     }
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:22,代碼來源:ShellOutput.php

示例4: isset

 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);
 }
開發者ID:itillawarra,項目名稱:cmfive,代碼行數:15,代碼來源:Output.php

示例5: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     parent::__construct($verbosity, $decorated, $formatter);
 }
開發者ID:cawaphp,項目名稱:cawa,代碼行數:7,代碼來源:ConsoleOutput.php

示例6: __construct

 public function __construct(LoggerInterface $logger)
 {
     $this->logger = $logger;
     parent::__construct();
 }
開發者ID:Mactronique,項目名稱:php_updater,代碼行數:5,代碼來源:MonologOutput.php

示例7: __construct

 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     // Use our own formatter
     parent::__construct($verbosity, $decorated, new Formatter());
 }
開發者ID:bonndan,項目名稱:release-manager,代碼行數:5,代碼來源:Output.php

示例8: __construct

 /**
  * Constructor.
  *
  * @author Art <a.molcanovas@gmail.com>
  */
 public function __construct()
 {
     parent::__construct(self::VERBOSITY_NORMAL, null, new OutputFormatter());
 }
開發者ID:aloframework,項目名稱:handlers,代碼行數:9,代碼來源:ConsoleOutput.php


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