src/Transport/RestTransport.php
public static function build($serviceAddress, $restConfigPath, array $config = [])
    {
        $config += [
            'httpHandler'  => null,
        ];
        list($baseUri, $port) = self::normalizeServiceAddress($serviceAddress);
        $requestBuilder = new RequestBuilder("$baseUri:$port", $restConfigPath);
        $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();
        return new RestTransport($requestBuilder, $httpHandler);
    }
public static function build($serviceAddress, $restConfigPath, array $config = [])
    {
        $config += [
            'httpHandler'  => null,
        ];
        list($baseUri, $port) = self::normalizeServiceAddress($serviceAddress);
        $requestBuilder = new RequestBuilder("$baseUri:$port", $restConfigPath);
        $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();
        return new RestTransport($requestBuilder, $httpHandler);
    }
public static function build ( $ serviceAddress , $ restConfigPath , array $ config = [ ] ) { $ config += [ 'httpHandler' => null , ] ; list ( $ baseUri , $ port ) = self :: normalizeServiceAddress ( $ serviceAddress ) ; $ requestBuilder = new RequestBuilder ( "$baseUri:$port" , $ restConfigPath ) ; $ httpHandler = $ config [ 'httpHandler' ] ? : self :: buildHttpHandlerAsync ( ) ; return new RestTransport ( $ requestBuilder , $ httpHandler ) ; }
Builds a RestTransport.

@param string $serviceAddress
The address of the API remote host, for example "example.googleapis.com".
@param string $restConfigPath
Path to rest config file.
@param array $config {
Config options used to construct the gRPC transport.

@type callable $httpHandler A handler used to deliver PSR-7 requests.
}
@return RestTransport
@throws ValidationException
Builds a RestTransport .