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