class CallOptions implements ArrayAccess (View source)

The CallOptions class provides typing to the associative array of options passed to transport RPC methods. See {TransportInterface::startUnaryCall()}, {@see TransportInterface::startBidiStreamingCall()}, {TransportInterface::startClientStreamingCall()}, and {TransportInterface::startServerStreamingCall()}.

Traits

Trait implemented by any class representing an associative array of PHP options.

Methods

bool
offsetExists($offset)

No description

offsetGet($offset)

No description

void
offsetSet($offset, $value)

No description

void
offsetUnset($offset)

No description

array
toArray()

No description

__construct(array $options)

No description

setHeaders(array $headers)

No description

setTimeoutMillis(int|null $timeoutMillis)

No description

setTransportSpecificOptions(array $transportSpecificOptions)

No description

setRetrySettings(RetrySettings|array|null $retrySettings)

No description

Details

bool offsetExists($offset)

No description

Parameters

$offset

Return Value

bool

offsetGet($offset)

No description

Parameters

$offset

void offsetSet($offset, $value)

No description

Parameters

$offset
$value

Return Value

void

Exceptions

BadMethodCallException

void offsetUnset($offset)

No description

Parameters

$offset

Return Value

void

Exceptions

BadMethodCallException

array toArray()

No description

Return Value

array

__construct(array $options)

No description

Parameters

array $options

{ Call options

@type array $headers
      Key-value array containing headers
@type int $timeoutMillis
      The timeout in milliseconds for the call.
@type array $transportOptions
      Transport-specific call options. See {[\Google\ApiCore\Options\CallOptions::setTransportOptions}.

](../../../Google/ApiCore/Options/CallOptions.html) @type RetrySettings|array $retrySettings A retry settings override for the call. If $retrySettings is an array, the settings will be merged with the method's default retry settings. If $retrySettings is a RetrySettings object, that object will be used instead of the method defaults. }

setHeaders(array $headers)

No description

Parameters

array $headers

setTimeoutMillis(int|null $timeoutMillis)

No description

Parameters

int|null $timeoutMillis

setTransportSpecificOptions(array $transportSpecificOptions)

No description

Parameters

array $transportSpecificOptions

{ Transport-specific call-time options.

@type array $grpcOptions
      Key-value pairs for gRPC-specific options passed as the `$options` argument to {\Grpc\BaseStub}
      request methods. Current options are `call_credentials_callback` and `timeout`.
      **NOTE**: This library sets `call_credentials_callback` using {\Google\ApiCore\CredentialsWrapper}, and `timeout`
      using the `timeoutMillis` call option, so these options are not very useful.
@type array $grpcFallbackOptions
      Key-value pairs for gRPC fallback specific options passed as the `$options` argument to the
      `$httpHandler` callable. By default these are passed to {\GuzzleHttp\Client} as request options.
      See https://docs.guzzlephp.org/en/stable/request-options.html.
@type array $restOptions
      Key-value pairs for REST-specific options passed as the `$options` argument to the `$httpHandler`
      callable. By default these are passed to {\GuzzleHttp\Client} as request options.
      See https://docs.guzzlephp.org/en/stable/request-options.html.

}

setRetrySettings(RetrySettings|array|null $retrySettings)

No description

Parameters

RetrySettings|array|null $retrySettings