コード例 #1
0
ファイル: BackupConfigs.php プロジェクト: kttis/LaravelFly
 public function bootstrap(Application $app)
 {
     $appConfig = $app->make('config');
     $needBackup = [];
     foreach ($appConfig['laravelfly.config_need_backup'] as $config) {
         if (isset($appConfig[$config])) {
             $needBackup[$config] = $appConfig[$config];
         }
     }
     $app->setNeedBackupConfigs($needBackup);
 }
コード例 #2
0
 public function bootstrap(Application $app)
 {
     $appConfig = $app->make('config');
     if (!empty($appConfig['laravelfly.providers_in_request'])) {
         $ps = array_intersect($appConfig['app.providers'], $appConfig['laravelfly.providers_in_request']);
         if ($ps) {
             $app->prepareIfProvidersInRequest($ps);
             $appConfig['app.providers'] = array_diff($appConfig['app.providers'], $ps);
             if ($appConfig['app.debug']) {
                 echo PHP_EOL, 'Providers in request ( they are removed from config["app.providers"] )', PHP_EOL, __CLASS__, PHP_EOL;
                 var_dump($ps);
             }
         }
     }
 }
コード例 #3
0
 public function bootstrap(Application $app)
 {
     $appConfig = $app->make('config');
     $needBackup = [];
     foreach ($appConfig['laravelfly.BaseServices'] as $name => $config) {
         if ($config) {
             $needBackup[$name] = $config;
         }
     }
     if (LARAVELFLY_GREEDY) {
         foreach ($appConfig['laravelfly.services_to_make_in_worker'] as $name => $config) {
             if (is_array($config)) {
                 $app->make($name);
                 if ($config) {
                     $needBackup[$name] = $config;
                 }
             }
         }
     }
     $app->setNeedBackupServiceAttributes($needBackup);
 }
コード例 #4
0
ファイル: BackupAttributes.php プロジェクト: kttis/LaravelFly
 public function bootstrap(Application $app)
 {
     $app->backUpOnWorker();
 }