Common functions used to work with various clients.
- internal
| Methods |
| public addMiddleware(callable $middlewareCallable) : void Add a middleware to the call stack by providing a callable which will be invoked at the start of each call, and will return an instance of {@see MiddlewareInterface} when invoked. The callable must have the following method signature: An implementation may look something like this:
|
| public close() Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled.
|
| public prependMiddleware(callable $middlewareCallable) : void Prepend a middleware to the call stack by providing a callable which will be invoked at the end of each call, and will return an instance of {@see MiddlewareInterface} when invoked. The callable must have the following method signature: An implementation may look something like this:
|
public static traitValidate(array $arr, array $requiredKeys)
|
public static validate(array $arr, array $requiredKeys)
|
public static validateNotNull(array $arr, array $requiredKeys)
|
| 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.
|
| protected modifyClientOptions(array $options) Modify options passed to the client before calling setClientOptions.
|
| protected modifyStreamingCallable(callable $callable) Modify the streaming callable.
|
| protected modifyUnaryCallable(callable $callable) Modify the unary callable.
|
| Properties |
| private array $agentHeader = [] |
| private bool $backwardsCompatibilityMode |
| private ?Google |
| private array $descriptors = [] |
| private static $gapicVersionFromFile = NULL |
private array $middlewareCallables = []
|
private array $prependMiddlewareCallables = []
|
private array $retrySettings = []
|
| private string $serviceName = '' |
| private ?Google |
| private array $transportCallMethods = ['startUnaryCall', 'startBidiStreamingCall', 'startClientStreamingCall', 'startServerStreamingCall'] |
| Methods |
| private arrayFilterRemoveNull(array $arr) Just like array_filter(), but preserves falsey values except null.
|
| private arrayMergeRecursive(array $array1, array $array2) A method, similar to PHP's
|
| private buildClientOptions(Google Resolve client options based on the client's default ({@see ClientOptionsTrait::getClientDefault}) and the default for all Google APIs.
|
private buildMethod(?string $interfaceName = NULL, ?string $methodName = NULL)
|
private buildRequestParamsHeader(array $headerParams, ?Google
|
private configureCallConstructionOptions(string $methodName, array $optionalArgs)
|
private configureCallOptions(array $optionalArgs) : array
|
private createCallStack(array $callConstructionOptions)
|
private createCredentialsWrapper( $credentials, array $credentialsConfig, string $universeDomain)
|
private createOperationsClient(array $options)
|
private createTransport(string $apiEndpoint, $transport, $transportConfig, ?callable $clientCertSource = NULL, bool $hasEmulator = false)
|
private static defaultTransport()
|
| private static determineMtlsEndpoint(string $apiEndpoint) |
| private static getClientDefaults() Get default options. This function should be "overridden" by clients using late static binding to provide default options to the client.
|
| private static getDefaultAudience() The SERVICE_ADDRESS constant is set by GAPIC clients |
| private static getGapicVersion(array $options) |
private static getGrpcDependencyStatus()
|
private getPagedListResponse(string $methodName, array $optionalArgs, string $decodeType, Google
|
private getPagedListResponseAsync(string $methodName, array $optionalArgs, string $decodeType, Google
|
| private static initGrpcGcpConfig(string $hostName, string $confPath) |
| private isAssoc(array $arr) Determine whether given array is associative.
|
private isBackwardsCompatibilityMode() : bool
|
private logConfiguration(Psr\Log\LoggerInterface|false|?null $logger, array $options) : void
|
| private pluck(string $key, array $arr, bool $isRequired = true) Pluck a value out of an array.
|
| private pluckArray(array $keys, array $arr) Pluck a subset of an array.
|
| private setClientOptions(array $options) Configures the GAPIC client based on an array of options.
|
| private shouldUseMtlsEndpoint(array $options) |
private startApiCall(string $methodName, ?Google
|
private startAsyncCall(string $methodName, Google
|
private startCall(string $methodName, string $decodeType, array $optionalArgs = [], ?Google
|
private startOperationsCall(string $methodName, array $optionalArgs, Google
|
| private subsetArray(array $keys, array $arr) Return a subset of an array, like pluckArray, without modifying the original array.
|
| private static supportedTransports() This defaults to all three transports, which One-Platform supports. Discovery clients should define this function and only return ['rest']. |
| private validateCallConfig(string $methodName) |
private static validateFileExists(string $filePath)
|
private static validateGrpcSupport()
|
| private static validateImpl( $arr, $requiredKeys, $allowNull) |
| Properties |
| private static $gapicVersionFromFile = NULL |
| Methods |
private static defaultTransport()
|
| private static determineMtlsEndpoint(string $apiEndpoint) |
| private static getClientDefaults() Get default options. This function should be "overridden" by clients using late static binding to provide default options to the client.
|
| private static getDefaultAudience() The SERVICE_ADDRESS constant is set by GAPIC clients |
| private static getGapicVersion(array $options) |
private static getGrpcDependencyStatus()
|
| private static initGrpcGcpConfig(string $hostName, string $confPath) |
| private static supportedTransports() This defaults to all three transports, which One-Platform supports. Discovery clients should define this function and only return ['rest']. |
public static traitValidate(array $arr, array $requiredKeys)
|
public static validate(array $arr, array $requiredKeys)
|
private static validateFileExists(string $filePath)
|
private static validateGrpcSupport()
|
| private static validateImpl( $arr, $requiredKeys, $allowNull) |
public static validateNotNull(array $arr, array $requiredKeys)
|