From 542e9bf5f2be45975c50aba8d55e2b7f46b0378a Mon Sep 17 00:00:00 2001 From: William Date: Sun, 30 Jan 2022 22:11:38 +0100 Subject: [PATCH] Commit --- app/core/AccessControl.php | 21 +++++++++++++++++++++ app/inc.php | 6 ++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 app/core/AccessControl.php diff --git a/app/core/AccessControl.php b/app/core/AccessControl.php new file mode 100644 index 0000000..a416e84 --- /dev/null +++ b/app/core/AccessControl.php @@ -0,0 +1,21 @@ +user = $user; + $this->routes = [ + "index.php" => $this->catcher() + ]; + } + + private function catcher(): void + { + // ... + } +} \ No newline at end of file diff --git a/app/inc.php b/app/inc.php index 14d9137..3adef95 100644 --- a/app/inc.php +++ b/app/inc.php @@ -20,10 +20,10 @@ spl_autoload_register(function ($class_name) { require __DIR__ . '/core/' . $class_name . '.php'; }); -// Error and exception handling +/* === App Setup === */ + new ErrorHandler; -// Setup $config = ( new Config(__DIR__ . '/config.php') )->config; @@ -32,6 +32,8 @@ $database = new Database($config['database']); $session = new Session; $user = new User($session); +new AccessControl($user); + $app = new App( $config, $database,