protected function _getService() { if (!$this->service) { $clientSecret = $this->_getKeyFile(); $client_email = $this->_getSAI(); $service = new GoogleSpreadsheets(); $service->setupByServiceAccountKey($clientSecret, $client_email); $this->service = $service; } return $this->service; }