_model === null) { $this->_model = new UserModel(); } return $this->_model; } public function point(string $id, string $point, string $sign = "+"): string { try { $entity = $this->getModel()->getEntityByID($id); if ($entity === null) { throw new \Exception("해당 ID{$id}는 사용자가 존재하지 않습니다."); } $this->getModel()->setPoint($id, intval($point), $sign); return "완료되었습니다."; } catch (\Exception $e) { log_message("error", $e->getMessage()); return $e->getMessage(); } } public function level(): string { try { $userModel = new UserModel(); $userModel->setLevel(); log_message("notice", "Mangboard->level 작업이 완료되었습니다."); return "완료되었습니다."; } catch (\Exception $e) { log_message("error", $e->getMessage()); return $e->getMessage(); } } }