config = $config; $game_settings = new Game_settings(); $registry->game_settings = $game_settings; $request = new Request(); $registry->request = $request; $session = new Session(); $registry->session = $session; $response = new Response(); $registry->response = $response; $document = new Document(); $registry->document = $document; $cookie = new Cookie(); $registry->cookie = $cookie; $db = new DB($config->db_type, $config->db_hostname, $config->db_username, $config->db_password, $config->db_database); $registry->db = $db; $user = new User($registry); $registry->user = $user; $load = new Load($registry); $registry->load = $load; $action = new Action($registry); $registry->action = $action; $actionString = parse_url($request->server["REQUEST_URI"], PHP_URL_PATH); if ($actionString == '/') { $actionString = ''; } if(!empty($actionString)) { $action->make($actionString); } else { $action->make('main/index'); } $response->output($action->go()); ?>