/** * start app * @throws \Exception */ public function start() { // load class if (!$this->load($this->app_path . $this->controllers_dir . DIRECTORY_SEPARATOR . ($controller_name = $this->request->get_controller()))) { throw new \Exception('File not found!', 404); } $c = new $controller_name(); if (!method_exists($c, $this->request->get_action())) { throw new \Exception('Page not found!', 404); } call_user_method($this->request->get_action(), $c); }