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


PHP Command::info方法代码示例

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


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

示例1: generate

 /**
  * Runs the generator.
  */
 public function generate()
 {
     $this->createModulesDir();
     $this->createFolders();
     $this->createFiles();
     $this->console->info("Your module [{$this->name}] has been generated.");
 }
开发者ID:mrterryh,项目名称:modules,代码行数:10,代码来源:ModuleGenerator.php

示例2: 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

示例3: handle

 /**
  * Handle the command.
  *
  * @param Markdown $markdown
  */
 public function handle(Markdown $markdown)
 {
     $this->command->info(strip_tags($markdown->transform(file_get_contents(base_path('LICENSE.md')))));
     if (!$this->command->confirm('Do you agree to the provided license and terms of service?')) {
         $this->command->error('You must agree to the license and terms of service before continuing.');
         exit;
     }
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:13,代码来源:ConfirmLicense.php

示例4: handle

 /**
  * Handle the command.
  *
  * @param  Filesystem  $filesystem
  * @param  Application $application
  * @return string
  */
 public function handle(Filesystem $filesystem, Application $application)
 {
     $destination = $application->getResourcesPath('streams/lang');
     if (is_dir($destination) && !$this->command->option('force')) {
         return $this->command->error("{$destination} already exists.");
     }
     $filesystem->copyDirectory(__DIR__ . '/../../../../resources/lang', $destination);
     $this->command->info("Published {$destination}");
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:16,代码来源:PublishTranslations.php

示例5: handle

 /**
  * Handle the command.
  *
  * @param  Filesystem  $filesystem
  * @param  Application $application
  * @return string
  */
 public function handle(Filesystem $filesystem, Application $application)
 {
     $destination = $application->getResourcesPath('addons/' . $this->addon->getVendor() . '/' . $this->addon->getSlug() . '-' . $this->addon->getType() . '/views');
     if (is_dir($destination) && !$this->command->option('force')) {
         $this->command->error("{$destination} already exists.");
         return;
     }
     $filesystem->copyDirectory($this->addon->getPath('resources/views'), $destination);
     $this->command->info("Published {$destination}");
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:17,代码来源:PublishViews.php

示例6: fire

 /**
  * Fire off the handler.
  *
  * @param  \Illuminate\Console\Command $console
  * @param  string                      $slug
  * @param  string                      $class
  * @return bool
  */
 public function fire(Command $console, $slug, $class)
 {
     $this->console = $console;
     $this->moduleName = Str::studly($slug);
     $this->className = studly_case($class);
     if ($this->module->exists($slug)) {
         $this->makeFile();
         return $this->console->info("Created Module Controller: [{$slug}] " . $this->getFilename());
     }
     return $this->console->info("Module [{$slug}] does not exist.");
 }
开发者ID:fabriciorabelo,项目名称:modules,代码行数:19,代码来源:ModuleMakeControllerHandler.php

示例7: fire

 /**
  * Fire off the handler.
  *
  * @param  \Illuminate\Console\Command $console
  * @param  string                      $slug
  * @param  string                      $class
  * @return bool
  */
 public function fire(Command $console, $slug, $name, $type)
 {
     $this->console = $console;
     $this->moduleName = studly_case($slug);
     $this->emailName = snake_case($name);
     $this->type = $type;
     if ($this->module->exists($this->moduleName)) {
         $this->makeFile();
         return $this->console->info("Created Module Email View: [{$this->moduleName}] " . $this->getFilename());
     }
     return $this->console->info("Module [{$this->moduleName}] does not exist.");
 }
开发者ID:cloud5ideas,项目名称:appkit,代码行数:20,代码来源:MakeModuleEmailHandler.php

示例8: handle

 /**
  * Handle the command.
  *
  * @param  Filesystem  $filesystem
  * @param  Application $application
  * @return string
  */
 public function handle(Filesystem $filesystem, Application $application)
 {
     $destination = $application->getResourcesPath('.env');
     if (!is_dir(dirname($destination))) {
         $filesystem->makeDirectory(dirname($destination), 0777, true, true);
     }
     if (is_file($destination) && !$this->command->option('force')) {
         return $this->command->error("{$destination} already exists.");
     }
     $filesystem->put($destination, '#EXAMPLE=foo');
     $this->command->info("Published {$destination}");
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:19,代码来源:PublishEnv.php

示例9: handle

 /**
  * Handle the command.
  *
  * @param  Filesystem  $filesystem
  * @param  Application $application
  * @return string
  */
 public function handle(Filesystem $filesystem, Application $application)
 {
     $destination = $application->getResourcesPath('routes.php');
     if (!is_dir(dirname($destination))) {
         $filesystem->makeDirectory(dirname($destination), 0777, true, true);
     }
     if (is_file($destination) && !$this->command->option('force')) {
         return $this->command->error("{$destination} already exists.");
     }
     $content = "<?php\n\n// Route::get('/', function () {\n//     return view('welcome');\n// });\n";
     $filesystem->put($destination, $content);
     $this->command->info("Published {$destination}");
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:20,代码来源:PublishRoutes.php

示例10: handle

 /**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $step = 1;
     $total = $this->installers->count();
     /* @var Installer $installer */
     while ($installer = $this->installers->shift()) {
         if ($this->command) {
             $this->command->info("{$step}/{$total} " . trans($installer->getMessage()));
         }
         $container->call($installer->getTask());
         $step++;
     }
 }
开发者ID:jacksun101,项目名称:streams-platform,代码行数:18,代码来源:RunInstallers.php

示例11: fire

 /**
  * Fire off the handler.
  *
  * @param \Aindong\Pluggables\Console\PluggableMakeMigrationCommand $console
  * @param string                                                    $slug
  *
  * @return string
  */
 public function fire(Command $console, $slug, $table)
 {
     $this->console = $console;
     $this->pluggableName = Str::studly($slug);
     $this->table = strtolower($table);
     $this->migrationName = snake_case($this->table);
     $this->className = studly_case($this->migrationName);
     if ($this->pluggable->exists($this->pluggableName)) {
         $this->makeFile();
         $this->console->info("Created Pluggable Migration: [{$this->pluggableName}] " . $this->getFilename());
         return exec('composer dump-autoload');
     }
     return $this->console->info("Pluggable [{$this->pluggableName}] does not exist.");
 }
开发者ID:aindong,项目名称:pluggables,代码行数:22,代码来源:PluggableMakeMigrationHandler.php

示例12: fire

 /**
  * @param Command $console
  * @param $module
  */
 public function fire(Command $console, $module)
 {
     $moduleName = Str::studly($module);
     if (!empty($moduleName)) {
         foreach ($this->module->all() as $module) {
             $this->publish($module);
         }
         return $console->info("All assets from all modules has been published successfully.");
     }
     if ($this->module->exists($moduleName)) {
         $this->publish($moduleName);
         return $console->info("Assets from module [{$moduleName}] has been published successfully.");
     }
     return $console->info("Module [{$moduleName}] does not exists.");
 }
开发者ID:acmadi,项目名称:modules-1,代码行数:19,代码来源:ModulePublisherHandler.php

示例13: fire

 public function fire($arguments, $options)
 {
     $instanceId = array_get($arguments, CommandRules::INSTANCE_ID);
     $logFile = array_get($arguments, CommandRules::LOGFILE);
     $user = array_get($options, CommandRules::USER);
     $keyFile = array_get($options, CommandRules::KEY_FILE);
     $host = $this->aws->getPublicDNSFromInstanceId($instanceId);
     if (is_null($host)) {
         $this->command->error('Error: Could not find Host from Instance ID. Please try again.');
     } else {
         $connection = $this->connectionFactory->createConnection($instanceId, $host, $user, $keyFile);
         $connection->run(array('tail -f ' . $logFile), function ($line) {
             $this->command->info($line);
         });
     }
 }
开发者ID:atyagi,项目名称:laravel-aws-ssh,代码行数:16,代码来源:EC2TailCommandController.php

示例14: info

 /**
  * Display info message with date and message, and log it
  * @param  string $message info message to display & log
  */
 public function info($message)
 {
     // Log message
     $this->log($message, 'info');
     // Display message
     parent::info(date($this->timestampFormat) . ' ' . $message);
 }
开发者ID:PoxyDoxy,项目名称:lanager,代码行数:11,代码来源:BaseCommand.php

示例15: fire

 /**
  * Fire off the handler.
  *
  * @param  \C5\AppKit\Console\ModuleMakeMigrationCommand $console
  * @param  string                                                  $slug
  * @return string
  */
 public function fire(Command $console, $slug, $table)
 {
     $this->console = $console;
     $this->moduleName = studly_case($slug);
     $this->table = str_plural(strtolower($table));
     $this->model = str_singular(studly_case($table));
     $this->migrationName = 'create_' . snake_case($this->table) . '_table';
     $this->className = studly_case($this->migrationName);
     if ($this->module->exists($this->moduleName)) {
         $this->makeMigration();
         $this->makeModel();
         $this->console->info("Created Module Migration: [{$this->moduleName}] " . $this->getFilename());
         return exec('composer dump-autoload');
     }
     return $this->console->info("Module [{$this->moduleName}] does not exist.");
 }
开发者ID:cloud5ideas,项目名称:appkit,代码行数:23,代码来源:MakeModuleMigrationHandler.php


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