コード例 #1
0
 /**
  * bootstrap method
  *
  * @param \Raphaelb\Foundation\Application $app
  *
  * @return mixed
  */
 public function bootstrap(Application $app)
 {
     $items = [];
     /** @var \Illuminate\Filesystem\Filesystem $fs */
     $fs = new Filesystem();
     $app->instance('config', $config = new Repository($items));
     foreach ($fs->files($app->getConfigPath()) as $file) {
         $config->set(Path::getFilenameWithoutExtension($file), $fs->getRequire($file));
     }
     // Foreach loop for .phar file.
     //  foreach (scandir($app->getConfigPath()) as $file )
     //  {
     //      $config->set(
     //          Path::getFilenameWithoutExtension($file),
     //          $fs->getRequire($app->getConfigPath() . '/' .$file)
     //      );
     //  }
     return $config;
 }
コード例 #2
0
 /**
  * bootstrap method
  *
  * @param Application $app
  *
  * @return mixed
  */
 public function bootstrap(Application $app)
 {
     $app->registerProviders();
 }
コード例 #3
0
 /**
  * bootstrap method
  */
 public function bootstrap()
 {
     $this->app->bootstrapWith($this->bootstrappers());
 }