Encapsulates shared functionality of request wrappers.

Trait
Methods
public getCredentialsFetcher()
 

Gets the credentials fetcher and sets up caching. Precedence is as
follows:

  • A user supplied credentials fetcher instance.
  • Credentials created from a keyfile.
  • Application default credentials.
  • Anonymous credentials.
  • return FetchAuthTokenInterface
public keyFile()
 

Get the Keyfile.

  • return array
public scopes()
 

Get the scopes

  • return array
public setCommonDefaults(array $config)
 

Sets common defaults between request wrappers.

  • throws InvalidArgumentException
Methods
protected getADC()
 

Returns application default credentials. Abstracted out for unit testing.

  • return FetchAuthTokenInterface
  • throws DomainException
Properties
private $authCache
 
  • var CacheItemPoolInterface A cache used for storing tokens.
private $authCacheOptions
 
  • var array Cache configuration options.
private $credentialsFetcher
 
  • var FetchAuthTokenInterface|null Fetches credentials.
private $keyFile
 
  • var array The contents of the service account credentials .json file retrieved from the Google Developers Console.
private $requestTimeout
 
  • var float Seconds to wait before timing out the request. **Defaults to** `0` with REST and `60` with gRPC.
private $retries
 
  • var int Number of retries for a failed request. **Defaults to** `3`.
private $scopes
 
  • var array Scopes to be used for the request.
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only