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,