mirror of
https://github.com/kevinpapst/kimai2.git
synced 2024-10-30 22:06:47 +00:00
24 lines
610 B
PHP
24 lines
610 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Kimai time-tracking app.
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
use App\Kernel;
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
(new Dotenv())->loadEnv(dirname(__DIR__) . '/.env');
|
|
|
|
$env = $_SERVER['APP_ENV'] ?? 'prod';
|
|
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? (in_array($env, ['dev', 'test'])));
|
|
|
|
$kernel = new Kernel($env, $debug);
|
|
$kernel->boot();
|
|
|
|
return $kernel->getContainer()->get('doctrine')->getManager(); // @phpstan-ignore-line
|