21 lines
414 B
PHP
21 lines
414 B
PHP
<?php
|
|
|
|
use App\Kernel;
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
|
|
$project_root=dirname(__DIR__);
|
|
|
|
$autoload_php=$project_root . '/vendor/autoload_runtime.php';
|
|
|
|
|
|
require_once $autoload_php;
|
|
|
|
if (file_exists($project_root . "/.env")) {
|
|
(new Dotenv())->usePutenv()->bootEnv($project_root . "/.env");
|
|
}
|
|
|
|
return function (array $context) {
|
|
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
|
};
|
|
|