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


PHP Kernel::call方法代码示例

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


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

示例1: handle

 /**
  * Handle the command.
  *
  * @param Kernel     $console
  * @param Dispatcher $events
  */
 public function handle(Kernel $console, Dispatcher $events, ModuleRepositoryInterface $modules)
 {
     $this->module->fire('uninstalling');
     $options = ['--addon' => $this->module->getNamespace()];
     $console->call('migrate:reset', $options);
     $console->call('streams:destroy', ['namespace' => $this->module->getSlug()]);
     $console->call('streams:cleanup');
     $modules->uninstall($this->module);
     $this->module->fire('uninstalled');
     $events->fire(new ModuleWasUninstalled($this->module));
 }
开发者ID:jacksun101,项目名称:streams-platform,代码行数:17,代码来源:UninstallModule.php

示例2: handle

 /**
  * Handle the command.
  *
  * @param Kernel                       $console
  * @param Dispatcher                   $events
  * @param ExtensionRepositoryInterface $extensions
  * @return bool
  */
 public function handle(Kernel $console, Dispatcher $events, ExtensionRepositoryInterface $extensions)
 {
     $this->extension->fire('uninstalling');
     $options = ['--addon' => $this->extension->getNamespace()];
     $console->call('migrate:reset', $options);
     $console->call('streams:destroy', ['namespace' => $this->extension->getSlug()]);
     $console->call('streams:cleanup');
     $extensions->uninstall($this->extension);
     $this->extension->fire('uninstalled');
     $events->fire(new ExtensionWasUninstalled($this->extension));
     return true;
 }
开发者ID:jacksun101,项目名称:streams-platform,代码行数:20,代码来源:UninstallExtension.php

示例3: handle

 /**
  * Handle the command.
  *
  * @param InstallExtension|Kernel      $console
  * @param AddonManager                 $manager
  * @param Dispatcher                   $dispatcher
  * @param ExtensionRepositoryInterface $extensions
  * @return bool
  */
 public function handle(Kernel $console, AddonManager $manager, Dispatcher $dispatcher, ExtensionRepositoryInterface $extensions)
 {
     $this->extension->fire('installing');
     $options = ['--addon' => $this->extension->getNamespace(), '--force' => true];
     $console->call('migrate:refresh', $options);
     $extensions->install($this->extension);
     $manager->register();
     if ($this->seed) {
         $console->call('db:seed', $options);
     }
     $this->extension->fire('installed');
     $dispatcher->fire(new ExtensionWasInstalled($this->extension));
     return true;
 }
开发者ID:jacksun101,项目名称:streams-platform,代码行数:23,代码来源:InstallExtension.php

示例4: fire

 /**
  * Execute the console command.
  *
  * @param ModuleCollection $modules
  * @param Repository       $config
  * @param Search           $search
  * @param Kernel           $console
  */
 public function fire(ModuleCollection $modules, Repository $config, Search $search, Kernel $console)
 {
     $stream = $this->argument('stream');
     if (!$stream) {
         $this->info('Destroying index');
         $console->call('search:destroy');
     } else {
         $this->info('Deleting ' . $stream);
         $search->search('stream', $stream)->delete();
     }
     /* @var Module $module */
     foreach ($modules->withConfig('search') as $module) {
         foreach ($config->get($module->getNamespace('search')) as $model => $search) {
             /* @var EntryModel $model */
             $model = new $model();
             if (!$stream || $stream == $model->getStreamNamespace() . '.' . $model->getStreamSlug()) {
                 $this->info('Rebuilding ' . $stream);
                 $this->output->progressStart($model->count());
                 foreach ($model->all() as $entry) {
                     $entry->save();
                     $this->output->progressAdvance();
                 }
                 $this->output->progressFinish();
             }
         }
     }
 }
开发者ID:visualturk,项目名称:search-module,代码行数:35,代码来源:Rebuild.php

示例5: call

 /**
  * Run an Artisan console command by name.
  *
  * @param string $command
  * @param array $parameters
  * @return int 
  * @static 
  */
 public static function call($command, $parameters = array())
 {
     //Method inherited from \Illuminate\Foundation\Console\Kernel
     return \App\Console\Kernel::call($command, $parameters);
 }
开发者ID:satriashp,项目名称:tour,代码行数:13,代码来源:_ide_helper.php

示例6: handle

 /**
  * Handle the command.
  */
 public function handle()
 {
     $this->command->call('migrate', ['--force' => true, '--addon' => 'anomaly.distribution.streams']);
     $this->command->call('migrate', ['--force' => true, '--addon' => 'anomaly.module.addons']);
     $this->command->call('migrate', ['--force' => true, '--no-addons' => true]);
 }
开发者ID:visualturk,项目名称:streams-distribution,代码行数:9,代码来源:RunMigrationsHandler.php

示例7: handle

 /**
  * Handle the command.
  *
  * @param Kernel $console
  */
 public function handle(Kernel $console)
 {
     $console->call('cache:clear');
 }
开发者ID:bloveless,项目名称:installer-module,代码行数:9,代码来源:ClearCache.php

示例8: handle

 /**
  * Handle the command.
  *
  * @param ModuleManager $manager
  */
 public function handle(Kernel $kernel)
 {
     $kernel->call('migrate', ['--force' => true, '--addon' => 'anomaly.module.installer']);
     $kernel->call('migrate', ['--force' => true, '--no-addons' => true]);
 }
开发者ID:bloveless,项目名称:installer-module,代码行数:10,代码来源:InstallBaseTables.php


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