public function bootstrap(App $app) { $conf = new Repository(new FileLoader($app->configPath()), ""); $app->instance("config", $conf); date_default_timezone_set($conf->get("app.timezone")); mb_internal_encoding('UTF-8'); }
public function setUp() { $this->app = new \Bootdi\App(); $this->container = $this->app->getContainer(); }
public function bootstrap(App $app) { $emitter = new EventEmitter(); $app->instance('events', $emitter); }
function config($name, $default = null) { $app = \Bootdi\App::getInstance(); return $app->make("config")->get($name, value($default)); }
public function bootstrap(App $app) { $dotEnv = new Dotenv($app->basePath()); file_exists($app->basePath() . DIRECTORY_SEPARATOR . ".env") && $dotEnv->load(); }
public function bootstrap() { $this->app->bootstrapWith([DotenvProvider::class, ConfigProvider::class, LoadConfigProvider::class]); }
public function bootstrap(App $app) { $app->registerConfigProviders(); }
public function testPath() { $this->assertEquals($this->rootPath, $this->app->basePath()); $this->assertEquals($this->rootPath . DIRECTORY_SEPARATOR . "app", $this->app->path()); $this->assertEquals($this->rootPath . DIRECTORY_SEPARATOR . "config", $this->app->configPath()); }