當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GeneratorCommand::fire方法代碼示例

本文整理匯總了PHP中Illuminate\Console\GeneratorCommand::fire方法的典型用法代碼示例。如果您正苦於以下問題:PHP GeneratorCommand::fire方法的具體用法?PHP GeneratorCommand::fire怎麽用?PHP GeneratorCommand::fire使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Console\GeneratorCommand的用法示例。


在下文中一共展示了GeneratorCommand::fire方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     parent::fire();
     if (!$this->option('plain')) {
         $this->createView();
     }
 }
開發者ID:ngangchill,項目名稱:laravel-widgets,代碼行數:12,代碼來源:WidgetMakeCommand.php

示例2: fire

 /**
  * Execute the command.
  *
  * @return void
  */
 public function fire()
 {
     parent::fire();
     if ($this->option('handler')) {
         $this->call('handler:command', ['name' => $this->argument('name') . 'Handler', '--command' => $this->parseName($this->argument('name'))]);
     }
 }
開發者ID:ngitimfoyo,項目名稱:Nyari-AppPHP,代碼行數:12,代碼來源:CommandMakeCommand.php

示例3: fire

 /**
  * Override the parent `fire` method so we can create our implementation as well
  */
 public function fire()
 {
     parent::fire();
     if ($this->option('which') == 'contract') {
         $this->call('parse:repository', ['name' => $this->argument('name'), '--which' => 'implementation']);
     }
 }
開發者ID:khangaikh,項目名稱:golocal,代碼行數:10,代碼來源:RepositoryMakeCommand.php

示例4: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (!$this->option('event')) {
         return $this->error('Missing required option: --event');
     }
     parent::fire();
 }
開發者ID:manhvu1212,項目名稱:videoplatform,代碼行數:12,代碼來源:ListenerMakeCommand.php

示例5: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false && $this->option('translated')) {
         $name = $this->getNameInput();
         $this->type = 'Admin model translation class';
         $this->call('administr:model', ['name' => "{$name}Translation"]);
     }
 }
開發者ID:administrcms,項目名稱:localization,代碼行數:13,代碼來源:MakeAdminModel.php

示例6: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     parent::fire();
     if (!$this->option('no-migration')) {
         $table = str_plural(snake_case(class_basename($this->argument('name'))));
         $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
     }
 }
開發者ID:HarveyCheng,項目名稱:myblog,代碼行數:13,代碼來源:ModelMakeCommand.php

示例7: handle

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     if (!$this->modelExists()) {
         $this->error('Model does not exists !');
         return false;
     }
     $this->type = $this->parseName($this->getNameInput());
     parent::fire();
 }
開發者ID:z-song,項目名稱:laravel-admin,代碼行數:14,代碼來源:MakeCommand.php

示例8: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() === false) {
         return;
     }
     if ($this->option('markdown')) {
         $this->writeMarkdownTemplate();
     }
 }
開發者ID:jarnovanleeuwen,項目名稱:framework,代碼行數:14,代碼來源:NotificationMakeCommand.php

示例9: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if ($this->option('migration')) {
             $table = Str::plural(Str::snake(class_basename($this->argument('name'))));
             $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
         }
     }
 }
開發者ID:manhvu1212,項目名稱:videoplatform,代碼行數:14,代碼來源:ModelMakeCommand.php

示例10: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if ($this->option('migration') && $this->table != '') {
             $table = $this->table;
             $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
         }
         if ($this->option('repository')) {
             $this->call('make:repository', ['name' => $this->argument('name')]);
         }
     }
 }
開發者ID:vampirekiss,項目名稱:lumen-restful-starter-kit,代碼行數:17,代碼來源:ModelMakeCommand.php

示例11: fire

 /**
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if ($this->option('migration')) {
             $table = Str::plural(Str::snake(class_basename($this->argument('name'))));
             $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
         }
         if ($this->option('controller')) {
             $controller = Str::camel(class_basename($this->argument('name')));
             $this->call('make:controller', ['name' => "{$controller}Controller", '--resource' => true]);
         }
     }
 }
開發者ID:notadd,項目名稱:framework,代碼行數:16,代碼來源:ModelMakeCommand.php

示例12: fire

 public function fire()
 {
     if ($this->compound !== null) {
         if (parent::fire() !== false) {
             if ($this->option($this->compound)) {
                 $name = $this->argument('name');
                 $this->call("hive:{$this->compound}", ['name' => $name]);
             }
         }
     } else {
         parent::fire();
     }
 }
開發者ID:EHLOVader,項目名稱:hive,代碼行數:13,代碼來源:HiveGeneratorCommand.php

示例13: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if ($this->option('model')) {
             $this->call('make:model', ['name' => $this->argument('name')]);
             $table = str_replace('._', '_', Str::plural(Str::snake(class_basename($this->argument('name')))));
             $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
         }
         if ($this->option('testcase')) {
             $this->call('make:test', ['name' => $this->argument('name')]);
         }
     }
 }
開發者ID:vampirekiss,項目名稱:lumen-restful-starter-kit,代碼行數:18,代碼來源:ApiMakeCommand.php

示例14: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if (!$this->option('no-routes')) {
             $path = Config::get('generator.path_routes', app_path('Http/routes.php'));
             $path = Config::get('generator.path_routes', app_path('Http/routes.php'));
             $content = $this->files->get($path);
             $name = $this->parseName($this->getNameInput());
             $content .= $this->buildRoute($name);
             $this->files->put($path, $content);
         }
     }
 }
開發者ID:georgeneculai,項目名稱:laravel-toolkit,代碼行數:18,代碼來源:ControllerCommand.php

示例15: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     if (parent::fire() !== false) {
         if ($this->option('with-repository')) {
             $this->comment('making repository');
             $this->call('api:new-repository', ['name' => $this->argument('name')]);
         }
         if ($this->option('with-migration')) {
             $this->comment('making migration');
             $name = $this->argument('name');
             $table = str_plural(snake_case($name));
             $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
         }
     }
 }
開發者ID:tokenly,項目名稱:laravel-api-provider,代碼行數:20,代碼來源:MakeAPIModelCommand.php


注:本文中的Illuminate\Console\GeneratorCommand::fire方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。