Restructed project and added docker support.
This commit is contained in:
28
src/Classes/System.php
Normal file
28
src/Classes/System.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
class System
|
||||
{
|
||||
private static $db;
|
||||
private static $config;
|
||||
|
||||
public static function Init(array $config)
|
||||
{
|
||||
self::$config = (object) $config;
|
||||
self::StartSession();
|
||||
|
||||
}
|
||||
|
||||
public static function Config()
|
||||
{
|
||||
return self::$config;
|
||||
}
|
||||
public static function StartSession()
|
||||
{
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
$path = parse_url(self::$config->BasePath, PHP_URL_PATH);
|
||||
|
||||
session_set_cookie_params(60*60*24, $path, $_SERVER['HTTP_HOST'], False, True);
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user