_category = $category; $this->_user_entity = $uer_entity; } public function getModel(): BoardsModel { if ($this->_model === null) { $this->_model = new BoardsModel(); } return $this->_model; } public function getEntity(): BoardsEntity { if ($this->_entity === null) { $this->_entity = $this->getModel()->getEntityByID("board_" . $this->getCategory()); } return $this->_entity; } //---------------------------------------------------------------------// public function getCategory(): string { return $this->_category; } public function getUserEntity(): UserEntity { if ($this->_user_entity === null) { throw new \Exception("사용자정보가 없습니다."); } return $this->_user_entity; } }