This commit is contained in:
2021-03-19 22:49:09 -03:00
parent ec44b0281e
commit 99c18cb871
8 changed files with 45 additions and 11 deletions

View File

@ -1,7 +1,15 @@
<?php
use Psr\Container\ContainerInterface as Container;
use Dotenv\Dotenv;
if (file_exists(implode(DIRECTORY_SEPARATOR, [dirname(__DIR__, 2), '.env']))) {
$dotenv = Dotenv::createImmutable(dirname(__DIR__, 2));
$dotenv->load();
}
return [
'base_path' => $_ENV['BASE_PATH'] ?? null,
'base_url' => $_ENV['BASE_URL'] ?? null,
'locations' => DI\decorate(function($prev, Container $container) {
$arr = (array) $prev;
$arr['base'] = dirname(__DIR__, 2);