addClassPaths('Local'); } public function getFormService(): LocalForm { if ($this->formServiceInstance === null) { $this->formServiceInstance = new LocalForm(); $this->formServiceInstance->setAttributes([ 'pk_field' => $this->model->getPKField(), 'title_field' => $this->model->getTitleField(), 'table' => $this->model->getTable(), 'useAutoIncrement' => $this->model->useAutoIncrement(), 'class_path' => $this->getClassPaths(false), ]); } return $this->formServiceInstance; } protected function login_process(array $formDatas): UserEntity { $entity = $this->getEntity(['id' => $formDatas['id'], 'status' => 'AVAILABLE'], true); if (!$entity instanceof UserEntity) { throw new \Exception("{$formDatas['id']}에 대한 로그인 정보를 찾을수 없습니다."); } if (!password_verify($formDatas['passwd'], $entity->getPassword())) { throw new \Exception("암호가 맞지 않습니다."); } return $entity; } public function login(AuthDTO $dto): UserEntity { if (!$dto instanceof LocalDTO) { throw new RuntimeException(__METHOD__ . "에서 오류발생: " . get_class($dto) . " DTO는 사용할 수 없습니다. LocalDTO만 허용됩니다."); } return parent::login($dto); } }