_board_name = $board_name; $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($this->getBoardName()); } return $this->_entity; } //---------------------------------------------------------------------// public function getBoardName(): string { return $this->_board_name; } public function getUserEntity(): UserEntity { if ($this->_user_entity === null) { throw new \Exception("사용자정보가 없습니다."); } return $this->_user_entity; } }