You are here

public function GoogleApiServiceClient::setAuthConfig in Google API PHP Client 8.4

Same name and namespace in other branches
  1. 8.3 src/Entity/GoogleApiServiceClient.php \Drupal\google_api_client\Entity\GoogleApiServiceClient::setAuthConfig()

Function set Json File.

Parameters

string $config: Pass Json contents of the file.

Overrides GoogleApiServiceClientInterface::setAuthConfig

File

src/Entity/GoogleApiServiceClient.php, line 207

Class

GoogleApiServiceClient
Defines the GoogleApiServiceClient entity.

Namespace

Drupal\google_api_client\Entity

Code

public function setAuthConfig($config) {
  if (is_array($config)) {
    $config = Json::encode($config);
  }
  return $this->auth_config = $config;
}