Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     $this->app = new \Bootdi\App();
     $this->container = $this->app->getContainer();
 }
Ejemplo n.º 3
0
 public function bootstrap(App $app)
 {
     $emitter = new EventEmitter();
     $app->instance('events', $emitter);
 }
Ejemplo n.º 4
0
 function config($name, $default = null)
 {
     $app = \Bootdi\App::getInstance();
     return $app->make("config")->get($name, value($default));
 }
Ejemplo n.º 5
0
 public function bootstrap(App $app)
 {
     $dotEnv = new Dotenv($app->basePath());
     file_exists($app->basePath() . DIRECTORY_SEPARATOR . ".env") && $dotEnv->load();
 }
Ejemplo n.º 6
0
 public function bootstrap()
 {
     $this->app->bootstrapWith([DotenvProvider::class, ConfigProvider::class, LoadConfigProvider::class]);
 }
Ejemplo n.º 7
0
 public function bootstrap(App $app)
 {
     $app->registerConfigProviders();
 }
Ejemplo n.º 8
0
 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());
 }