Copied!

The GrpcTransportOptions class provides typing to the associative array of options used to configure {@see \Google\ApiCore\Transport\GrpcTransport}.

CloneableInstantiable
Methods
public __construct(array $options)
 
  • param array $options { Config options used to construct the gRPC transport. @type array $stubOpts Options used to construct the gRPC stub (see {@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}). @type Channel $channel Grpc channel to be used. @type Interceptor[]|UnaryInterceptorInterface[] $interceptors EXPERIMENTAL Interceptors used to intercept RPC invocations before a call starts. Please note that implementations of {@see \Google\ApiCore\Transport\Grpc\UnaryInterceptorInterface} are considered deprecated and support will be removed in a future release. To prepare for this, please take the time to convert UnaryInterceptorInterface implementations over to a class which extends {@see \Grpc\Interceptor}. @type callable $clientCertSource A callable which returns the client cert as a string. @type null|false|LoggerInterface A PSR-3 Logger Interface. }
public offsetExists( $offset) : bool
public offsetGet( $offset)
 
  • return mixed
  • attribute ReturnTypeWillChange
public offsetSet( $offset, $value) : void
 
  • throws \BadMethodCallException
public offsetUnset( $offset) : void
 
  • throws \BadMethodCallException
public setChannel(?Grpc\Channel $channel) : self
 
  • param ?\Channel $channel
  • return $this
public setClientCertSource(?callable $clientCertSource) : self
 
  • param ?callable $clientCertSource
  • return $this
public setInterceptors(array $interceptors) : self
 
  • param \Interceptor[]|\UnaryInterceptorInterface[] $interceptors
  • return $this
public setLogger(Psr\Log\LoggerInterface|false|?null $logger) : self
 
  • param null|false|\LoggerInterface $logger
  • return $this
public setStubOpts(array $stubOpts) : self
 
  • param array $stubOpts
  • return $this
public toArray() : array
Properties
private ?Grpc\Channel $channel
private ?Closure $clientCertSource
private array $interceptors
 
  • var \Interceptor[]|\UnaryInterceptorInterface[]
private Psr\Log\LoggerInterface|false|?null $logger
private array $stubOpts
Methods
private fromArray(array $arr) : void
 

Sets the array of options as class properites.

  • param array $arr See the constructor for the list of supported options.
private static validateFileExists(string $filePath)
 
  • param string $filePath
  • throws \ValidationException
Methods
private static validateFileExists(string $filePath)
 
  • param string $filePath
  • throws \ValidationException
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration