From 5659ee2a52fae333da5c29f02afde3ba4c8ff2d0 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 24 Jan 2022 08:38:51 +0100 Subject: [PATCH] Commit --- app/core/Config.php | 16 ++++++++++++++++ app/inc.php | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/core/Config.php diff --git a/app/core/Config.php b/app/core/Config.php new file mode 100644 index 0000000..6651082 --- /dev/null +++ b/app/core/Config.php @@ -0,0 +1,16 @@ +config = require $path; + } +} \ No newline at end of file diff --git a/app/inc.php b/app/inc.php index fa486a2..0cc2b2d 100644 --- a/app/inc.php +++ b/app/inc.php @@ -21,7 +21,9 @@ spl_autoload_register(function ($class_name) { }); // Setup -$config = require __DIR__ . '/config.php'; +$config = ( + new Config(__DIR__ . '/config.php') +)->config; $database = new Database($config['database']); $session = new Session; $user = new User($session);