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


PHP Console\Kernel類代碼示例

本文整理匯總了PHP中App\Console\Kernel的典型用法代碼示例。如果您正苦於以下問題:PHP Kernel類的具體用法?PHP Kernel怎麽用?PHP Kernel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

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

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

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

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

示例5: bootstrap

 /**
  * Bootstrap the application for artisan commands.
  *
  * @return void 
  * @static 
  */
 public static function bootstrap()
 {
     //Method inherited from \Illuminate\Foundation\Console\Kernel
     \App\Console\Kernel::bootstrap();
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:11,代碼來源:_ide_helper.php

示例6: setArtisan

 /**
  * Set the Artisan application instance.
  *
  * @param \Illuminate\Console\Application $artisan
  * @return void 
  * @static 
  */
 public static function setArtisan($artisan)
 {
     //Method inherited from \Illuminate\Foundation\Console\Kernel
     \App\Console\Kernel::setArtisan($artisan);
 }
開發者ID:eipe,項目名稱:mytentsite,代碼行數:12,代碼來源:_ide_helper.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

示例9: schedule

 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     parent::schedule($schedule);
     $schedule->command('crm-launcher:updateCases')->everyMinute()->when(function () {
         return Message::exists();
     });
     $schedule->command('crm-launcher:activity')->everyMinute()->when(function () {
         return Message::exists();
     });
     $schedule->command('crm-launcher:updateDashboardStats')->everyFiveMinutes();
     $schedule->command('crm-launcher:updatePublishmentStats')->everyFiveMinutes();
     $schedule->command('crm-launcher::resetNotified')->daily();
 }
開發者ID:rubenwouters,項目名稱:crm-launcher,代碼行數:19,代碼來源:Kernel.php

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


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