addClassName('Customer'); } final public function getClientService(): ClientService { if (!$this->_clientService) { $this->_clientService = new ClientService($this->request); } return $this->_clientService; } //ServiceItemController,ServiceController에서 사용 final public function getServiceItemLinkService(string $key): mixed { if (!array_key_exists($key, $this->_equipmentService)) { switch ($key) { case 'SERVER': $this->_equipmentService[$key] = new ServerService(); break; case 'CPU': $this->_equipmentService[$key] = new CpuService(); break; case 'RAM': $this->_equipmentService[$key] = new RamService(); break; case 'STORAGE': $this->_equipmentService[$key] = new StorageService(); break; case 'LINE': $this->_equipmentService[$key] = new LineService(); break; case 'IP': // $this->_equipmentService[$key] = new ServiceItemIpService(); $this->_equipmentService[$key] = new IpService(); break; case 'DEFENCE': $this->_equipmentService[$key] = new DefenceService(); break; case 'SOFTWARE': $this->_equipmentService[$key] = new SoftwareService(); break; case 'DOMAIN': $this->_equipmentService[$key] = new DomainService(); break; default: throw new \Exception(__FUNCTION__ . "에서 사용하지않는 Service를 요청하였습니다.: {$key}"); } } return $this->_equipmentService[$key]; } //기본기능 final public function getClient(int $uid): ClientEntity { $entity = $this->getClientService()->getEntity($uid); if (!$entity) { throw new \Exception("{$uid}에 해당하는 고객/관리자 정보가 존재하지 않습니다. uid: {$uid}"); } return $entity; } }