当前位置: 首页>>代码示例>>PHP>>正文


PHP ConsoleOutput::setDecorated方法代码示例

本文整理汇总了PHP中Symfony\Component\Console\Output\ConsoleOutput::setDecorated方法的典型用法代码示例。如果您正苦于以下问题:PHP ConsoleOutput::setDecorated方法的具体用法?PHP ConsoleOutput::setDecorated怎么用?PHP ConsoleOutput::setDecorated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Console\Output\ConsoleOutput的用法示例。


在下文中一共展示了ConsoleOutput::setDecorated方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 protected function setUp()
 {
     $this->oldApplicationContext = ApplicationContext::getInstance();
     $this->applicationContext = $this->createApplicationContext();
     $this->applicationContext->setPlugin($this->getPlugin());
     $this->applicationContext->setComponent('input', new ArgvInput());
     $output = new ConsoleOutput();
     $output->setDecorated(false);
     $this->applicationContext->setComponent('output', $output);
     ApplicationContext::setInstance($this->applicationContext);
 }
开发者ID:rsky,项目名称:stagehand-testrunner,代码行数:11,代码来源:TestCase.php

示例2: __construct

 public function __construct()
 {
     $this->setGlobalInput();
     $this->consoleOutput = new ConsoleOutput();
     if ($this->globalInput->hasParameterOption(array('--ansi'))) {
         $this->consoleOutput->setDecorated(true);
     } elseif ($this->globalInput->hasParameterOption(array('--no-ansi'))) {
         $this->consoleOutput->setDecorated(false);
     }
     parent::__construct(self::NAME, self::VERSION);
     $dispatcher = new EventDispatcher();
     $dispatcher->addListener(ConsoleEvents::COMMAND, array($this, 'onCommand'));
     $this->setDispatcher($dispatcher);
     $this->loadConfig();
     $this->addCoreCommands();
     // start output buffering to intercept show_error calls
     ob_start();
     register_shutdown_function(array($this, 'shutdown'));
 }
开发者ID:A2-Hosting,项目名称:eecli,代码行数:19,代码来源:Application.php

示例3: terminate

 public function terminate($request, $response)
 {
     $output = new ConsoleOutput();
     $output->setDecorated(true);
     $output->writeln('<fg=green>REQUEST:</> ' . '<fg=yellow>Method: ' . $request->method() . '</>; ' . '<fg=yellow>Ajax: ' . $request->ajax() . '</>; ' . '<fg=yellow>Input: ' . json_encode($request->all()) . '</>');
 }
开发者ID:sontdhust,项目名称:eruza,代码行数:6,代码来源:LogRequest.php


注:本文中的Symfony\Component\Console\Output\ConsoleOutput::setDecorated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。