GRPC PHP  1.38.0
Public Member Functions | Protected Member Functions | Protected Attributes
Grpc\AbstractCall Class Reference

Public Member Functions

 __construct (Channel $channel, $method, $deserialize, array $options=[])
 Create a new Call wrapper object. More...
 
 getMetadata ()
 
 getTrailingMetadata ()
 
 getPeer ()
 
 cancel ()
 Cancels the call. More...
 
 setCallCredentials ($call_credentials)
 Set the CallCredentials for the underlying Call. More...
 

Protected Member Functions

 _serializeMessage ($data)
 Serialize a message to the protobuf binary format. More...
 
 _deserializeResponse ($value)
 Deserialize a response value to an object. More...
 

Protected Attributes

 $call
 
 $deserialize
 
 $metadata
 
 $trailing_metadata
 

Constructor & Destructor Documentation

◆ __construct()

Grpc\AbstractCall::__construct ( Channel  $channel,
  $method,
  $deserialize,
array  $options = [] 
)

Create a new Call wrapper object.

Parameters
Channel$channelThe channel to communicate on
string$methodThe method to call on the remote server
callback$deserializeA callback function to deserialize the response
array$optionsCall options (optional)

Member Function Documentation

◆ _deserializeResponse()

Grpc\AbstractCall::_deserializeResponse (   $value)
protected

Deserialize a response value to an object.

Parameters
string$valueThe binary value to deserialize
Returns
mixed The deserialized value

◆ _serializeMessage()

Grpc\AbstractCall::_serializeMessage (   $data)
protected

Serialize a message to the protobuf binary format.

Parameters
mixed$dataThe Protobuf message
Returns
string The protobuf binary format

◆ cancel()

Grpc\AbstractCall::cancel ( )

Cancels the call.

◆ getMetadata()

Grpc\AbstractCall::getMetadata ( )
Returns
mixed The metadata sent by the server

Reimplemented in Grpc\ServerStreamingCall, and Grpc\UnaryCall.

◆ getPeer()

Grpc\AbstractCall::getPeer ( )
Returns
string The URI of the endpoint

◆ getTrailingMetadata()

Grpc\AbstractCall::getTrailingMetadata ( )
Returns
mixed The trailing metadata sent by the server

◆ setCallCredentials()

Grpc\AbstractCall::setCallCredentials (   $call_credentials)

Set the CallCredentials for the underlying Call.

Parameters
CallCredentials$call_credentialsThe CallCredentials object

Field Documentation

◆ $call

Grpc\AbstractCall::$call
protected

◆ $deserialize

Grpc\AbstractCall::$deserialize
protected

◆ $metadata

Grpc\AbstractCall::$metadata
protected

◆ $trailing_metadata

Grpc\AbstractCall::$trailing_metadata
protected

The documentation for this class was generated from the following file: