PHP Class Grpc\AbstractCall

Mostrar archivo Open project: grpc/grpc

Protected Properties

Property Type Description
$call Call
$deserialize
$metadata
$trailing_metadata

Public Methods

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

Protected Methods

Method Description
deserializeResponse ( string $value ) : mixed Deserialize a response value to an object.
serializeMessage ( mixed $data ) : string Serialize a message to the protobuf binary format.

Method Details

__construct() public method

Create a new Call wrapper object.
public __construct ( Channel $channel, string $method, callback $deserialize, array $options = [] )
$channel Channel The channel to communicate on
$method string The method to call on the remote server
$deserialize callback A callback function to deserialize the response
$options array Call options (optional)

cancel() public method

Cancels the call.
public cancel ( )

deserializeResponse() protected method

Deserialize a response value to an object.
protected deserializeResponse ( string $value ) : mixed
$value string The binary value to deserialize
return mixed The deserialized value

getMetadata() public method

public getMetadata ( ) : mixed
return mixed The metadata sent by the server.

getPeer() public method

public getPeer ( ) : string
return string The URI of the endpoint.

getTrailingMetadata() public method

public getTrailingMetadata ( ) : mixed
return mixed The trailing metadata sent by the server.

serializeMessage() protected method

Serialize a message to the protobuf binary format.
protected serializeMessage ( mixed $data ) : string
$data mixed The Protobuf message
return string The protobuf binary format

setCallCredentials() public method

Set the CallCredentials for the underlying Call.
public setCallCredentials ( CallCredentials $call_credentials )
$call_credentials CallCredentials The CallCredentials object

Property Details

$call protected_oe property

protected Call $call
return Call

$deserialize protected_oe property

protected $deserialize

$metadata protected_oe property

protected $metadata

$trailing_metadata protected_oe property

protected $trailing_metadata