Copied!

A transport that sends protobuf over HTTP 1.1 that can be used when full gRPC support is not available.

CloneableInstantiable
Methods
public __construct(string $baseUri, callable $httpHandler)
 
  • param string $baseUri
  • param callable $httpHandler A handler used to deliver PSR-7 requests.
public static build(string $apiEndpoint, array $config = [])
 

Builds a GrpcFallbackTransport.

  • param string $apiEndpoint The address of the API remote host, for example "example.googleapis.com".
  • param array $config { Config options used to construct the grpc-fallback transport. @type callable $httpHandler A handler used to deliver PSR-7 requests. }
  • return \GrpcFallbackTransport
  • throws \ValidationException
public close()
 
    public startBidiStreamingCall(Google\ApiCore\Call $call, array $options)
     
    • return never
    • throws \BadMethodCallException
    public startClientStreamingCall(Google\ApiCore\Call $call, array $options)
     
    • return never
    • throws \BadMethodCallException
    public startServerStreamingCall(Google\ApiCore\Call $call, array $options)
     
    • return never
    • throws \BadMethodCallException
    public startUnaryCall(Google\ApiCore\Call $call, array $options)
     
      public static validate(array $arr, array $requiredKeys)
       
      • param array $arr Associative array
      • param array $requiredKeys List of keys to check for in $arr
      • return array Returns $arr for fluent use
      public static validateNotNull(array $arr, array $requiredKeys)
       
      • param array $arr Associative array
      • param array $requiredKeys List of keys to check for in $arr
      • return array Returns $arr for fluent use
      Properties
      private string $baseUri
      private $clientCertSource = NULL
      private static $defaultPort = 443
      private $httpHandler = NULL
      private $transportName = NULL
      Methods
      private static buildCommonHeaders(array $options)
       
      • param array $options
      • return array
      private static buildHttpHandlerAsync(Psr\Log\LoggerInterface|false|?null $logger = NULL)
       
      • return callable
      • throws \ValidationException
      private buildRequest(Google\ApiCore\Call $call, array $options)
       
      • param \Call $call
      • param array $options
      • return \RequestInterface
      private configureMtlsChannel(callable $clientCertSource)
       

      Set the path to a client certificate.

      • param callable $clientCertSource
      private getCallOptions(array $options)
       
      • param array $options
      • return array
      private static loadClientCertSource(callable $clientCertSource)
      private static normalizeServiceAddress(string $apiEndpoint)
       
      • param string $apiEndpoint
      • return array
      • throws \ValidationException
      private throwUnsupportedException()
       
      • return never
      • throws \BadMethodCallException
      private transformException(Exception $ex)
       
      • param \Exception $ex
      • return \Exception
      private unpackResponse(Google\ApiCore\Call $call, Psr\Http\Message\ResponseInterface $response)
       
      • param \Call $call
      • param \ResponseInterface $response
      • return \Message
      private static validateFileExists(string $filePath)
       
      • param string $filePath
      • throws \ValidationException
      private static validateImpl( $arr, $requiredKeys, $allowNull)
      Properties
      private static $defaultPort = 443
      Methods
      public static build(string $apiEndpoint, array $config = [])
       

      Builds a GrpcFallbackTransport.

      • param string $apiEndpoint The address of the API remote host, for example "example.googleapis.com".
      • param array $config { Config options used to construct the grpc-fallback transport. @type callable $httpHandler A handler used to deliver PSR-7 requests. }
      • return \GrpcFallbackTransport
      • throws \ValidationException
      private static buildCommonHeaders(array $options)
       
      • param array $options
      • return array
      private static buildHttpHandlerAsync(Psr\Log\LoggerInterface|false|?null $logger = NULL)
       
      • return callable
      • throws \ValidationException
      private static loadClientCertSource(callable $clientCertSource)
      private static normalizeServiceAddress(string $apiEndpoint)
       
      • param string $apiEndpoint
      • return array
      • throws \ValidationException
      public static validate(array $arr, array $requiredKeys)
       
      • param array $arr Associative array
      • param array $requiredKeys List of keys to check for in $arr
      • return array Returns $arr for fluent use
      private static validateFileExists(string $filePath)
       
      • param string $filePath
      • throws \ValidationException
      private static validateImpl( $arr, $requiredKeys, $allowNull)
      public static validateNotNull(array $arr, array $requiredKeys)
       
      • param array $arr Associative array
      • param array $requiredKeys List of keys to check for in $arr
      • return array Returns $arr for fluent use
      © 2025 Bruce Wells
      Search Namespaces \ Classes
      Configuration