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


PHP Command::comment方法代码示例

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


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

示例1: createFolder

 /**
  * Create the specified folder.
  *
  * @param $folder
  * @param $success
  * @param $error
  */
 protected function createFolder($folder, $success, $error)
 {
     if (!is_dir($folder)) {
         $this->files->makeDirectory($folder);
         return $this->console->info($success);
     }
     return $this->console->comment($error);
 }
开发者ID:acmadi,项目名称:modules-1,代码行数:15,代码来源:ModuleSetupHandler.php

示例2: getMessage

 private function getMessage($route, $target_id, \Illuminate\Database\Eloquent\Model $user, \Illuminate\Console\Command $command)
 {
     $url = $route . '/' . $user->id . '/' . $target_id;
     $request = Request::create($url, 'GET');
     Input::initialize([]);
     if ($command->option('verbose')) {
         $command->comment('route:' . $route);
     }
     $item = $this->router->dispatch($request)->getOriginalContent();
     if ($item === null) {
         return;
     }
     $view = 'sms.' . $route;
     $message = view($view, ['item' => $item]);
     if (Config::get('sms-manager.prefix')) {
         $message = Config::get('sms-manager.prefix') . $message;
     }
     $adminPhone = Config::get('sms-manager.admin_phone');
     $receiver_number = $adminPhone ? $adminPhone : $user->phone;
     $to = $user->name;
     // HACKHACK: Needs to update the database instead
     if ($receiver_number[0] != '6') {
         $receiver_number = '6' . $receiver_number;
     }
     return (object) ['to' => $to, 'receiver_number' => $receiver_number, 'message' => $message];
 }
开发者ID:klsandbox,项目名称:SmsManager,代码行数:26,代码来源:SmsSender.php

示例3: fire

 /**
  * Fire off the handler.
  *
  * @param \Aindong\Pluggables\Console\PluggableMakeCommand $console
  * @param string                                           $slug
  *
  * @return bool
  */
 public function fire(Command $console, $slug)
 {
     $this->console = $console;
     $this->slug = strtolower($slug);
     $this->name = Str::studly($slug);
     if ($this->pluggable->exists($this->slug)) {
         $console->comment('Pluggable [{$this->name}] already exists.');
         return false;
     }
     $this->generate($console);
 }
开发者ID:aindong,项目名称:pluggables,代码行数:19,代码来源:PluggableMakeHandler.php

示例4: fire

 /**
  * @param Command $console
  * @param $name
  * @return bool
  */
 public function fire(Command $console, $name)
 {
     $this->console = $console;
     $this->name = $name;
     $this->Name = Str::studly($name);
     if ($this->module->has($this->Name)) {
         $console->comment("Module [{$this->Name}] already exists.");
         return false;
     }
     $this->generate($console);
 }
开发者ID:acmadi,项目名称:modules-1,代码行数:16,代码来源:ModuleGeneratorHandler.php

示例5: insertEntries

 /**
  * Insert entries in a table
  *
  * @param string $table
  * @param array  $entries
  */
 protected function insertEntries($table, $entries)
 {
     $slices = array($entries);
     // If the engine is SQLite and we have a lot of seeded entries
     // We'll split the results to not overflow the variable limit
     if (DB::getDriverName() === 'sqlite') {
         $slicer = floor(999 / sizeof($entries[0]));
         $slices = array_chunk($entries, $slicer);
     }
     if ($this->command) {
         $this->command->comment('Insert entries');
     }
     $this->progressIterator($slices, function ($entries) use($table) {
         DB::table($table)->insert($entries);
     });
 }
开发者ID:anahkiasen,项目名称:fakable,代码行数:22,代码来源:Fakable.php

示例6: comment

 public function comment($string)
 {
     if (!$this->option('silent')) {
         parent::comment($string);
     }
 }
开发者ID:nanaya,项目名称:osu-web,代码行数:6,代码来源:SilentEnabledCommand.php

示例7: showModifiedNotification

 /**
  * Notify the user that the given view has been modified.
  *
  * @param  \SplFileInfo  $view
  * @return void
  */
 protected function showModifiedNotification($view)
 {
     $this->command->comment('    ⇒ View [' . $this->relativeViewPath($view) . '] has been modified. Skipping...');
 }
开发者ID:defenestrator,项目名称:groid,代码行数:10,代码来源:UpdateViews.php

示例8: comment

 /**
  * Allow the management of tabulation at the beginning of a message
  *
  * @param string $message
  * @param null $verbosity
  * @param int $tab
  */
 public function comment($message, $verbosity = null, $tab = 0)
 {
     for ($i = 0; $i < $tab; $i++) {
         $message = '  ' . $message;
     }
     parent::comment($message, $verbosity);
 }
开发者ID:Jchedev,项目名称:laravel-evolved,代码行数:14,代码来源:Command.php

示例9: fire

 /**
  * Fire off the handler.
  *
  * @param  \C5\AppKit\Console\ModuleMakeCommand $console
  * @param  string                                         $slug
  * @return bool
  */
 public function fire(Command $console, $slug, $blank = false)
 {
     $this->console = $console;
     $this->slug = $slug;
     $this->name = strtolower($slug);
     $this->blank = $blank;
     if ($this->module->exists($this->slug)) {
         $console->comment('Module [{$this->name}] already exists.');
         return false;
     }
     $this->generate($console);
 }
开发者ID:cloud5ideas,项目名称:appkit,代码行数:19,代码来源:MakeModuleHandler.php

示例10: commandComment

 public function commandComment($message)
 {
     $this->commandObj->comment($message);
 }
开发者ID:infyomlabs,项目名称:laravel-generator,代码行数:4,代码来源:CommandData.php

示例11: writeComment

 /**
  * Display console message
  *
  * @param   string $s the message to display
  *
  * @return  void
  */
 public function writeComment($s)
 {
     if ($this->display) {
         parent::comment($s);
     }
 }
开发者ID:potsky,项目名称:laravel-localization-helpers,代码行数:13,代码来源:LocalizationAbstract.php

示例12: comment

 public function comment($message)
 {
     parent::comment($this->log($message, 'Comment'));
 }
开发者ID:oeed,项目名称:Keystone-Next,代码行数:4,代码来源:LoggingCommand.php

示例13: comment

 public function comment($string)
 {
     parent::comment($string);
     Log::info($string, [get_called_class()]);
 }
开发者ID:Nebo15,项目名称:ariadne.api,代码行数:5,代码来源:LoggableCommand.php

示例14: comment

 /**
  * Write a string as debug output.
  *
  * @param  string  $string
  * @param  null|int|string  $verbosity
  * @return void
  */
 public function comment($string, $verbosity = null)
 {
     $string = $this->label('debug') . $string;
     $this->log('debug', $string);
     parent::comment($string, $verbosity);
 }
开发者ID:gummibeer,项目名称:backuplay,代码行数:13,代码来源:Command.php

示例15: comment

 /**
  * Display console message
  *
  * @param  string  $string
  * @param  null|int|string  $verbosity
  *
  * @return  void
  */
 public function comment($string, $verbosity = null)
 {
     if ($this->display) {
         parent::comment($string, $verbosity);
     }
 }
开发者ID:torann,项目名称:localization-helpers,代码行数:14,代码来源:LocalizationAbstract.php


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