config; $database = new Database($config['database']); $session = new Session(); $user = new User($session, $database); $app = new App(__DIR__, $config, $database, $session, $user); // we will use $app instead unset($config, $database, $session, $user); new AccessControl($app); return $app;