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


PHP ConsoleOutput::doWrite方法代码示例

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


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

示例1: doWrite

 /**
  * {@inheritdoc}
  */
 protected function doWrite($message, $newline)
 {
     if (trim($message) != '') {
         $message = $this->prefixWithTimestamp($message);
     }
     parent::doWrite($message, $newline);
 }
开发者ID:cawaphp,项目名称:cawa,代码行数:10,代码来源:ConsoleOutput.php

示例2: doWrite

 /**
  * Prefix message with current datetime.
  *
  * @param string $message
  * @param bool   $newline
  */
 protected function doWrite($message, $newline)
 {
     $date = (new \DateTime())->format('Y-m-d H:i:s');
     if (!empty($message)) {
         $message = sprintf('[%s] %s', $date, $message);
     }
     parent::doWrite($message, $newline);
 }
开发者ID:dongilbert,项目名称:mautic,代码行数:14,代码来源:ConsoleDatetimeOutput.php

示例3: doWrite

 public function doWrite($message, $newline)
 {
     // In case the $message is multi lines
     $message = str_replace(PHP_EOL, PHP_EOL . $this->getIndentPadding(), $message);
     if ($this->positionIsALineStart) {
         $message = $this->getIndentPadding() . $message;
     }
     $this->positionIsALineStart = $newline;
     parent::doWrite($message, $newline);
 }
开发者ID:bonndan,项目名称:release-manager,代码行数:10,代码来源:Output.php

示例4: doWrite

 /**
  * Writes a message to the output.
  *
  * Handles paged output, or writes directly to the output stream.
  *
  * @param string $message A message to write to the output
  * @param bool $newline Whether to add a newline or not
  */
 public function doWrite($message, $newline)
 {
     if ($this->paging > 0) {
         $this->pager->doWrite($message, $newline);
     } else {
         parent::doWrite($message, $newline);
     }
 }
开发者ID:JesseDarellMoore,项目名称:CS499,代码行数:16,代码来源:ShellOutput.php

示例5: doWrite

 public function doWrite($message, $newline)
 {
     return parent::doWrite(mb_convert_encoding($message, 'CP850', 'UTF-8'), $newline);
 }
开发者ID:pscheit,项目名称:psc-cms,代码行数:4,代码来源:WindowsConsoleOutput.php


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