2023-04-08 00:42:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
define('SCRIPT_STARTED', hrtime(true));
|
|
|
|
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
|
|
|
const ROOT = __DIR__;
|
|
|
|
const VERSION = '';
|
|
|
|
const REVISION = '';
|
|
|
|
const REVISION_DATE = '';
|
|
|
|
|
|
|
|
$dotenv = Dotenv\Dotenv::createImmutable(ROOT);
|
|
|
|
$dotenv->load();
|
|
|
|
|
|
|
|
class Container
|
|
|
|
{
|
|
|
|
static SokoWeb\Interfaces\Database\IConnection $dbConnection;
|
2023-04-18 23:35:17 +02:00
|
|
|
static SokoWeb\Interfaces\Database\IAuditLogger $auditLogger;
|
2023-04-19 23:19:22 +02:00
|
|
|
static SokoWeb\Interfaces\PersistentData\IPersistentDataManager $persistentDataManager;
|
2023-04-20 00:33:06 +02:00
|
|
|
static SokoWeb\Interfaces\Routing\IRouteCollection $routeCollection;
|
2023-04-08 00:42:55 +02:00
|
|
|
static SokoWeb\Interfaces\Session\ISessionHandler $sessionHandler;
|
|
|
|
static SokoWeb\Interfaces\Request\IRequest $request;
|
|
|
|
}
|
|
|
|
|
|
|
|
Container::$dbConnection = new SokoWeb\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
2023-04-18 23:35:17 +02:00
|
|
|
Container::$auditLogger = new RVR\Database\AuditLogger(Container::$dbConnection, 'audit_log');
|
2023-04-19 23:19:22 +02:00
|
|
|
Container::$persistentDataManager = new SokoWeb\PersistentData\PersistentDataManager(Container::$dbConnection, Container::$auditLogger);
|