Common functions used to work with various clients.

Trait
Methods
public close()
 

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

  • experimental
public static validate( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
public static validateNotNull( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
Methods
protected getCredentialsWrapper()
 

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

protected getTransport()
 

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

  • access private
  • return TransportInterface
protected modifyClientOptions(array $options)
 

Modify options passed to the client before calling setClientOptions.

  • access private
protected modifyStreamingCallable(callable $callable)
 

Modify the streaming callable.

  • access private
protected modifyUnaryCallable(callable $callable)
 

Modify the unary callable.

  • access private
Properties
private $agentHeader
private $credentialsWrapper
private $descriptors
private static $gapicVersionFromFile
private $retrySettings
 
  • var RetrySettings[] $retrySettings
private $serviceName
private $transport
 
  • var TransportInterface
private $transportCallMethods
Methods
private arrayFilterRemoveNull(array $arr)
 

Just like array_filter(), but preserves falsey values except null.

  • return array
private buildClientOptions(array $options)
private buildMethod( $interfaceName, $methodName)
 
  • return string
private configureCallConstructionOptions( $methodName, array $optionalArgs)
 
  • return array
private createCallStack(array $callConstructionOptions)
 
  • return callable
private createCredentialsWrapper( $credentials, array $credentialsConfig)
private createOperationsClient(array $options)
 
  • return OperationsClient
private createTransport( $apiEndpoint, $transport, array $transportConfig)
 
private static defaultTransport()
 
  • return string
private static getClientDefaults()
 

Get default options. This function should be "overridden" by clients using late static
binding to provide default options to the client.

  • return array
  • access private
private static getGapicVersion(array $options)
private static getGrpcDependencyStatus()
 
  • return bool
private getPagedListResponse( $methodName, array $optionalArgs, $decodeType, Google\Protobuf\Internal\Message $request, $interfaceName = NULL)
private static initGrpcGcpConfig( $hostName, $confPath)
private isAssoc(array $arr)
 

Determine whether given array is associative.

  • return bool
private pluck( $key, array $arr, $isRequired = true)
 

Pluck a value out of an array.

  • return mixed|null
  • throws InvalidArgumentException
private pluckArray(array $keys, $arr)
 

Pluck a subset of an array.

  • return array
private setClientOptions(array $options)
 

Configures the GAPIC client based on an array of options.

private startCall( $methodName, $decodeType, array $optionalArgs = [], ?Google\Protobuf\Internal\Message $request = NULL, $callType = 0, $interfaceName = NULL)
 
  • return PromiseInterface|\BidiStream|\ClientStream|\ServerStream
private startOperationsCall( $methodName, array $optionalArgs, Google\Protobuf\Internal\Message $request, Google\ApiCore\LongRunning\OperationsClient $client, $interfaceName = NULL)
 
  • return PromiseInterface
private subsetArray(array $keys, $arr)
 

Return a subset of an array, like pluckArray, without modifying the original array.

  • return array
private static validateFileExists( $filePath)
private static validateGrpcSupport()
private static validateImpl( $arr, $requiredKeys, $allowNull)
Properties
private static $gapicVersionFromFile
Methods
private static defaultTransport()
 
  • return string
private static getClientDefaults()
 

Get default options. This function should be "overridden" by clients using late static
binding to provide default options to the client.

  • return array
  • access private
private static getGapicVersion(array $options)
private static getGrpcDependencyStatus()
 
  • return bool
private static initGrpcGcpConfig( $hostName, $confPath)
public static validate( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
private static validateFileExists( $filePath)
private static validateGrpcSupport()
private static validateImpl( $arr, $requiredKeys, $allowNull)
public static validateNotNull( $arr, $requiredKeys)
 
  • return array Returns $arr for fluent use
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only