service === null) { $this->service = service('localauth'); } $this->addActionPaths(self::PATH); } protected function action_init_process(string $action): void { parent::action_init_process($action); $fields = ['id', 'passwd']; $filters = []; switch ($action) { case 'login': case 'login_form': break; default: throw new \Exception("지원하지 않는 action입니다.({$action})"); // break; } $this->addViewDatas('helper', $this->service->getHelper()); $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields($action, $fields)); $this->addViewDatas('formFilters', $this->service->getFormService()->getFormFilters($action, $filters)); $this->addViewDatas('formRules', $this->service->getFormService()->getFormRules($action, $fields)); $this->addViewDatas('formOptions', $this->service->getFormService()->getFormOptions($action, $filters)); } //로그인처리 protected function login_process(): UserEntity { $dto = new LocalDTO($this->request->getPost()); return $this->service->login($dto); } protected function logout_process(): void { $this->service->logout(); } }