2020-05-17 19:29:06 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
2020-05-17 22:30:22 +02:00
|
|
|
const ROOT = __DIR__;
|
2020-06-12 19:15:34 +02:00
|
|
|
const VERSION = '';
|
|
|
|
const REVISION = '';
|
|
|
|
const REVISION_DATE = '';
|
2020-05-17 22:30:22 +02:00
|
|
|
|
|
|
|
$dotenv = Dotenv\Dotenv::createImmutable(ROOT);
|
2020-05-17 19:29:06 +02:00
|
|
|
$dotenv->load();
|
|
|
|
|
|
|
|
if (!empty($_ENV['DEV'])) {
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
ini_set('display_errors', '1');
|
|
|
|
} else {
|
|
|
|
ini_set('display_errors', '0');
|
|
|
|
}
|
2020-05-25 18:52:42 +02:00
|
|
|
|
2020-05-28 21:03:08 +02:00
|
|
|
class Container
|
|
|
|
{
|
|
|
|
static MapGuesser\Interfaces\Database\IConnection $dbConnection;
|
2020-05-31 20:36:43 +02:00
|
|
|
static MapGuesser\Routing\RouteCollection $routeCollection;
|
2020-05-28 21:03:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Container::$dbConnection = new MapGuesser\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
2020-05-31 20:36:43 +02:00
|
|
|
Container::$routeCollection = new MapGuesser\Routing\RouteCollection();
|
2020-05-28 21:03:08 +02:00
|
|
|
|
2020-05-25 18:52:42 +02:00
|
|
|
session_start();
|