PHP Trait Google\Cloud\RequestWrapperTrait

Show file Open project: GoogleCloudPlatform/gcloud-php

Public Methods

Method Description
getCredentialsFetcher ( ) : Google\Auth\FetchAuthTokenInterface Gets the credentials fetcher and sets up caching. Precedence begins with user supplied credentials fetcher instance, followed by a reference to a key file stream, and finally the application default credentials.
setCommonDefaults ( array $config ) Sets common defaults between request wrappers.

Method Details

getCredentialsFetcher() public method

Gets the credentials fetcher and sets up caching. Precedence begins with user supplied credentials fetcher instance, followed by a reference to a key file stream, and finally the application default credentials.
public getCredentialsFetcher ( ) : Google\Auth\FetchAuthTokenInterface
return Google\Auth\FetchAuthTokenInterface

setCommonDefaults() public method

Sets common defaults between request wrappers.
public setCommonDefaults ( array $config )
$config array { Configuration options. @type CacheItemPoolInterface $authCache A cache for storing access tokens. **Defaults to** a simple in memory implementation. @type array $authCacheOptions Cache configuration options. @type FetchAuthTokenInterface $credentialsFetcher A credentials fetcher instance. @type string $keyFile The contents of the service account credentials .json file retrieved from the Google Developers Console. @type int $retries Number of retries for a failed request. **Defaults to** `3`. @type array $scopes Scopes to be used for the request. }