_socket) { $this->_socket = new GoogleSocket(); } return $this->_socket; } final public function getService(): GoogleService { if (!$this->_service) { $this->_service = new GoogleService($this->getSocket()); } return $this->_service; } public function getSNSButton(): string { //구글 로그인 BUTTON용 return anchor($this->getSocket()->createAuthUrl(), ICONS['GOOGLE'] . 'Google 로그인', ["class" => "btn-google"]); } //로그인처리 protected function create_process(array $formDatas): void { if (!array_key_exists('access_code', $formDatas) || !$formDatas['access_code']) { throw new \Exception("구글 로그인 실패"); } $this->entity = $this->getService()->login($formDatas); } }