2020-05-17 19:29:06 +02:00
|
|
|
<?php
|
|
|
|
|
2020-06-27 01:19:17 +02:00
|
|
|
define('SCRIPT_STARTED', hrtime(true));
|
|
|
|
|
2020-05-17 19:29:06 +02:00
|
|
|
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();
|
|
|
|
|
2020-05-28 21:03:08 +02:00
|
|
|
class Container
|
|
|
|
{
|
2023-04-07 20:28:14 +02:00
|
|
|
static SokoWeb\Interfaces\Database\IConnection $dbConnection;
|
2023-04-20 00:19:54 +02:00
|
|
|
static SokoWeb\Interfaces\PersistentData\IPersistentDataManager $persistentDataManager;
|
2023-04-07 20:28:14 +02:00
|
|
|
static SokoWeb\Routing\RouteCollection $routeCollection;
|
|
|
|
static SokoWeb\Interfaces\Session\ISessionHandler $sessionHandler;
|
|
|
|
static SokoWeb\Interfaces\Request\IRequest $request;
|
2020-05-28 21:03:08 +02:00
|
|
|
}
|
|
|
|
|
2023-04-07 20:28:14 +02:00
|
|
|
Container::$dbConnection = new SokoWeb\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
2023-04-20 00:19:54 +02:00
|
|
|
Container::$persistentDataManager = new SokoWeb\PersistentData\PersistentDataManager(Container::$dbConnection);
|