Copied!

The MockServerStreamingCall class is used to mock out the \Grpc\ServerStreamingCall class (https://github.com/grpc/grpc/blob/master/src/php/lib/Grpc/ServerStreamingCall.php)

  • internal
CloneableInstantiable
Methods
public __construct(array $responses, $deserialize = NULL, ?stdClass $status = NULL)
 

MockServerStreamingCall constructor.

  • param mixed[] $responses A list of response objects.
  • param callable|array|null $deserialize An optional deserialize method for the response object.
  • param \stdClass|null $status An optional status object. If set to null, a status of OK is used.
public Grpc\AbstractCall::cancel()
 

Cancels the call.

public Grpc\ServerStreamingCall::getMetadata()
 
  • return mixed The metadata sent by the server
public Grpc\AbstractCall::getPeer()
 
  • return string The URI of the endpoint
public getStatus()
 
  • return \stdClass|null
  • throws \ApiException
public Grpc\AbstractCall::getTrailingMetadata()
 
  • return mixed The trailing metadata sent by the server
public responses()
public Grpc\AbstractCall::setCallCredentials( $call_credentials)
 

Set the CallCredentials for the underlying Call.

  • param \CallCredentials $call_credentials The CallCredentials object
public Grpc\ServerStreamingCall::start( $data, array $metadata = [], array $options = [])
 

Start the call.

  • param mixed $data The data to send
  • param array $metadata Metadata to send with the call, if applicable (optional)
  • param array $options An array of options, possible keys: 'flags' => a number (optional)
Properties
protected Grpc\AbstractCall::$call = NULL
 
  • var \Call
protected Grpc\AbstractCall::$deserialize = NULL
protected Grpc\AbstractCall::$metadata = NULL
protected Grpc\AbstractCall::$trailing_metadata = NULL
Methods
protected Grpc\AbstractCall::_deserializeResponse( $value)
 

Deserialize a response value to an object.

  • param string $value The binary value to deserialize
  • return mixed The deserialized value
protected Grpc\AbstractCall::_serializeMessage( $data)
 

Serialize a message to the protobuf binary format.

  • param mixed $data The Protobuf message
  • return string The protobuf binary format
protected deserializeMessage( $message, $deserialize)
 
  • param mixed $message
  • param mixed $deserialize
Properties
private $responses = NULL
private $status = NULL
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration