Esempio n. 1
0
 /**
  * Bootstrap Dotenv.
  *
  * @param  \Conrock\Application $app
  */
 public function bootstrap(Application $app)
 {
     $path = $app->get_base_path();
     if (!file_exists($path . '/.env')) {
         throw new InvalidArgumentException('Cannot find .env file in ' . $path);
     }
     $dotenv = new Dotenv($path);
     $dotenv->load();
     $dotenv->required($app->get_required());
     if (!defined('WP_ENV')) {
         define('WP_ENV', getenv('WP_ENV') ?: 'development');
     }
 }