The GrpcRequestWrapper is responsible for delivering gRPC requests.

public __construct(array $config = [])

    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 send(callable $request, array $args, array $options = [])
    Deliver the request.

    • return array
    public setCommonDefaults(array $config)
    Sets common defaults between request wrappers.

    • throws InvalidArgumentException
    protected getADC()
    Returns application default credentials. Abstracted out for unit testing.

    • return FetchAuthTokenInterface
    • throws DomainException
    private $authCache

    • var CacheItemPoolInterface A cache used for storing tokens.
    private $authCacheOptions

    • var array Cache configuration options.
    private $authHttpHandler

    • var callable A handler used to deliver Psr7 requests specifically for authentication.
    private $credentialsFetcher

    • var FetchAuthTokenInterface|null Fetches credentials.
    private $grpcOptions

    • var array gRPC specific configuration options passed off to the ApiCore library.
    private $grpcRetryCodes

    • var array gRPC retry codes.
    private $keyFile

    • var array The contents of the service account credentials .json file retrieved from the Google Developers Console.
    private $metadataTypes

    • var array Map of error metadata types to RPC wrappers.
    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.
    private $serializer

    • var Serializer A serializer used to encode responses.
    private convertToGoogleException( $ex)
    Convert a ApiCore exception to a Google Exception.

    private handleResponse( $response)
    Serializes a gRPC response.

    • return Generator|\OperationResponse|array|null
    private handleStream( $response)
    Handles a streaming response.

    • return Generator|array|null
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only