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


PHP Command::call方法代码示例

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


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

示例1: seedAdminRole

 /**
  * @return mixed
  */
 public function seedAdminRole()
 {
     if ($this->command->option('verbose')) {
         return $this->command->call('db:seed', ['--class' => 'Modules\\User\\Database\\Seeders\\GroupSeedTableSeeder']);
     }
     return $this->command->callSilent('db:seed', ['--class' => 'Modules\\User\\Database\\Seeders\\GroupSeedTableSeeder']);
 }
开发者ID:SocietyCMS,项目名称:Core,代码行数:10,代码来源:AdminUserInstaller.php

示例2: generate

 /**
  * @param Command $console
  * @return bool
  */
 protected function generate(Command $console)
 {
     $this->generateFolders();
     $this->generateFiles();
     $console->call('module:seed-make', array('module' => $this->name, 'name' => $this->Name, '--master'));
     $console->call('module:controller', array('module' => $this->name, 'controller' => $this->Name . 'Controller'));
     $console->info("Module [{$this->Name}] has been created successfully.");
     return true;
 }
开发者ID:acmadi,项目名称:modules-1,代码行数:13,代码来源:ModuleGeneratorHandler.php

示例3: fire

 /**
  * Fire the install script.
  *
  * @param Command $command
  *
  * @return mixed
  */
 public function fire(Command $command)
 {
     if ($command->option('verbose')) {
         $command->call('key:generate');
         $command->call('api:key-generate');
         return;
     }
     $command->callSilent('key:generate');
     $command->callSilent('api:key-generate');
 }
开发者ID:SocietyCMS,项目名称:Core,代码行数:17,代码来源:SetAppKey.php

示例4: call

 public function call($command, array $arguments = [], array $options = [])
 {
     foreach ($options as $option => $value) {
         $arguments['--' . $option] = $value;
     }
     return parent::call($command, $arguments);
 }
开发者ID:robclancy,项目名称:xf-toolkit,代码行数:7,代码来源:Base.php

示例5: generateResources

 /**
  * Generate some resources.
  */
 public function generateResources()
 {
     $this->console->call('module:make-seed', ['name' => $this->getName(), 'module' => $this->getName(), '--master' => true]);
     $this->console->call('module:make-provider', ['name' => $this->getName() . 'ServiceProvider', 'module' => $this->getName(), '--master' => true]);
     $this->console->call('module:make-controller', ['controller' => $this->getName() . 'Controller', 'module' => $this->getName()]);
     $this->console->call('module:make-backend-controller', ['controller' => $this->getName() . 'Controller', 'module' => $this->getName()]);
 }
开发者ID:zedx,项目名称:core,代码行数:10,代码来源:ModuleGenerator.php

示例6: generateLangResources

 /**
  * Generate request classes.
  */
 public function generateLangResources()
 {
     if (!$this->confirm('Do you want to create the language resource files?')) {
         return;
     }
     foreach ($this->getMainTables() as $table) {
         $this->console->call('generate:lang', ['name' => $this->getEntity($table), '--languages' => $this->console->option('languages'), '--translations' => $this->getLangTranslations($table), '--force' => $this->console->option('force')]);
     }
 }
开发者ID:mayconbordin,项目名称:laragen,代码行数:12,代码来源:ScaffoldGenerator.php

示例7: generateRequest

 /**
  * Generate request classes.
  */
 public function generateRequest()
 {
     if (!$this->confirm('Do you want to create form request classes?')) {
         return;
     }
     foreach (['Create', 'Update'] as $request) {
         $name = $this->getPrefix('/') . $this->getEntities() . '/' . $request . Str::studly($this->getEntity()) . 'Request';
         $this->console->call('generate:request', ['name' => $name, '--scaffold' => true, '--auth' => true, '--rules' => $this->console->option('fields'), '--force' => $this->console->option('force')]);
     }
 }
开发者ID:dcodingti,项目名称:loteria,代码行数:13,代码来源:ScaffoldGenerator.php

示例8: handle

 /**
  * Handle the command.
  *
  * @param AddonCollection $addons
  */
 public function handle(AddonCollection $addons)
 {
     foreach ($this->paths as $path) {
         $options = ['--path' => $path];
         if ($this->command->option('force')) {
             $options['--force'] = true;
         }
         if ($this->command->option('pretend')) {
             $options['--pretend'] = true;
         }
         if ($this->command->option('seed')) {
             $options['--seed'] = true;
         }
         if ($database = $this->command->option('database')) {
             $options['--database'] = $database;
         }
         $this->command->call('migrate', $options);
     }
     return;
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:25,代码来源:MigrateStreams.php

示例9: handle

 /**
  * Handle the command.
  *
  * @param AddonCollection $addons
  */
 public function handle(AddonCollection $addons)
 {
     foreach ($addons->enabled() as $addon) {
         $options = ['--addon' => $addon->getNamespace()];
         if ($this->command->option('force')) {
             $options['--force'] = true;
         }
         if ($this->command->option('pretend')) {
             $options['--pretend'] = true;
         }
         if ($this->command->option('seed')) {
             $options['--seed'] = true;
         }
         if ($database = $this->command->option('database')) {
             $options['--database'] = $database;
         }
         $this->command->call('migrate', $options);
     }
     return;
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:25,代码来源:MigrateAllAddons.php

示例10: fire

 /**
  * Fire the install script.
  *
  * @param Command $command
  *
  * @return mixed
  */
 public function fire(Command $command)
 {
     if ($command->option('verbose')) {
         $command->blockMessage('Themes', 'Publishing theme assets ...', 'comment');
     }
     if ($command->option('verbose')) {
         $command->call('stylist:publish');
         return;
     }
     $command->callSilent('stylist:publish');
 }
开发者ID:SocietyCMS,项目名称:Core,代码行数:18,代码来源:ThemeAssets.php

示例11: fire

 /**
  * Fire the install script
  * @param  Command $command
  * @return mixed
  */
 public function fire(Command $command)
 {
     $this->command = $command;
     // Publish asgard configs
     if ($this->command->option('verbose')) {
         $this->command->call('vendor:publish', ['--provider' => 'Modules\\Core\\Providers\\CoreServiceProvider']);
     } else {
         $this->command->callSilent('vendor:publish', ['--provider' => 'Modules\\Core\\Providers\\CoreServiceProvider']);
     }
     if (!$this->checkIsInstalled()) {
         return $this->command->error('No user driver was installed. Please check the presence of a Service Provider');
     }
     $this->publish();
     $this->configure();
     $this->migrate();
     $this->seed();
     $this->createFirstUser();
     if ($this->command->option('verbose')) {
         $command->info($this->driver . ' succesfully configured');
     }
 }
开发者ID:mikemand,项目名称:Core,代码行数:26,代码来源:ProviderInstaller.php

示例12: fire

 /**
  * Fire the install script
  * @param  Command $command
  * @return mixed
  */
 public function fire(Command $command)
 {
     if ($command->option('verbose')) {
         $command->blockMessage('Seeds', 'Running the module seeds ...', 'comment');
     }
     foreach ($this->modules as $module) {
         if ($command->option('verbose')) {
             $command->call('module:seed', ['module' => $module]);
             continue;
         }
         $command->callSilent('module:seed', ['module' => $module]);
     }
 }
开发者ID:Houbsi,项目名称:Core,代码行数:18,代码来源:ModuleSeeders.php

示例13: enable

 /**
  * Fire demo scripts.
  *
  * @param Command $command
  *
  * @return bool
  */
 public function enable(Command $command)
 {
     $command->call('down');
     foreach ($this->scripts as $script) {
         try {
             $this->app->make($script)->fire($command);
         } catch (\Exception $e) {
             $command->error($e->getMessage());
             return false;
         }
     }
     $command->call('up');
     return true;
 }
开发者ID:SocietyCMS,项目名称:Core,代码行数:21,代码来源:DemoMode.php

示例14: fire

 /**
  * Clear the settings cache, and backup the databases.
  *
  * @param \Illuminate\Console\Command $command
  *
  * @return void
  */
 public function fire(Command $command)
 {
     $command->line('Clearing settings cache...');
     $this->cache->clear();
     $command->line('Settings cache cleared!');
     $command->line('Backing up database...');
     try {
         $command->call('db:backup', ['--compression' => 'gzip', '--database' => $this->config->get('database.default'), '--destination' => 'local', '--destinationPath' => Carbon::now()->format('Y-m-d H.i.s'), '--no-interaction' => true]);
     } catch (Exception $e) {
         $command->error($e->getMessage());
         $command->line('Backup skipped!');
     }
     $command->line('Backup completed!');
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:21,代码来源:CommandSubscriber.php

示例15: runMigrationRollback

 /**
  * Executa rollback das migrations do modulo
  *
  * @param array $rollback
  * @param Command $command
  * @return array|bool
  */
 private static function runMigrationRollback(array $rollback, Command $command)
 {
     $errors = [];
     if (array_key_exists(Strings::ROLLBACK_MIGRATE, $rollback)) {
         if ($rollback[Strings::ROLLBACK_MIGRATE] == true) {
             try {
                 $command->call(Strings::COMMAND_ROLLBACK);
                 if (array_key_exists(Strings::ROLLBACK_LOADED_MODULE_TAG, $rollback)) {
                     if (count(DB::table(Strings::TABLE_PROJECT_MODULES)->where(Strings::TABLE_PROJECT_MODULES_NAME, $rollback[Strings::ROLLBACK_LOADED_MODULE_TAG])->first()) > 0) {
                         $errors[] = Strings::ERROR_MIGRATE_ROLLBACK;
                     }
                 } else {
                     $errors[] = Strings::ERROR_GET_MODULE_NAME_FROM_DB;
                 }
             } catch (Exception $e) {
                 $errors[] = Strings::ERROR_DATABASE_CONECTION;
             }
         }
     }
     return !empty($errors) ? $errors : true;
 }
开发者ID:almeida-fogo,项目名称:laravel-modules,代码行数:28,代码来源:RollbackManager.php


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