當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。