trait GapicClientTrait (View source)

Common functions used to work with various clients.

Traits

Provides basic array helper methods.
Provides helper methods for gRPC support.

Methods

static array
validate(array $arr, array $requiredKeys)

No description

static array
validateNotNull(array $arr, array $requiredKeys)

No description

close()

Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled.

TransportInterface
getTransport()

Get the transport for the client. This method is protected to support use by customized clients.

CredentialsWrapper
getCredentialsWrapper()

Get the credentials for the client. This method is protected to support use by customized clients.

modifyClientOptions(array $options)

Modify options passed to the client before calling setClientOptions.

modifyUnaryCallable(callable $callable)

Modify the unary callable.

modifyStreamingCallable(callable $callable)

Modify the streaming callable.

Details

static array validate(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

static array validateNotNull(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

close()

Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled.

protected TransportInterface getTransport()

Get the transport for the client. This method is protected to support use by customized clients.

Return Value

TransportInterface

protected CredentialsWrapper getCredentialsWrapper()

Get the credentials for the client. This method is protected to support use by customized clients.

Return Value

CredentialsWrapper

protected modifyClientOptions(array $options)

Modify options passed to the client before calling setClientOptions.

Parameters

array $options

protected modifyUnaryCallable(callable $callable)

Modify the unary callable.

Parameters

callable $callable

protected modifyStreamingCallable(callable $callable)

Modify the streaming callable.

Parameters

callable $callable