diff options
author | Stanley Cheung <stanleycheung@google.com> | 2015-08-27 09:41:59 -0700 |
---|---|---|
committer | Stanley Cheung <stanleycheung@google.com> | 2015-09-02 13:34:40 -0700 |
commit | 5331776c17f775911fedcadfcb530bd46af024ea (patch) | |
tree | f340726941cdc640d3a051189163888f2618d12b /src/php/lib/Grpc/ClientStreamingCall.php | |
parent | 3ab8e79b0111dc93696d72e815531b5ee3124230 (diff) |
php: clean up api around flags
Diffstat (limited to 'src/php/lib/Grpc/ClientStreamingCall.php')
-rw-r--r-- | src/php/lib/Grpc/ClientStreamingCall.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php index 97c241a087..29b9185411 100644 --- a/src/php/lib/Grpc/ClientStreamingCall.php +++ b/src/php/lib/Grpc/ClientStreamingCall.php @@ -50,12 +50,13 @@ class ClientStreamingCall extends AbstractCall { * Write a single message to the server. This cannot be called after * wait is called. * @param ByteBuffer $data The data to write - * @param array $options an array of options + * @param array $options an array of options, possible keys: + * 'flags' => a number */ public function write($data, $options = array()) { $message_array = ['message' => $data->serialize()]; - if ($grpc_write_flags = self::getGrpcWriteFlags($options)) { - $message_array['flags'] = $grpc_write_flags; + if (isset($options['flags'])) { + $message_array['flags'] = $options['flags']; } $this->call->startBatch([OP_SEND_MESSAGE => $message_array]); } |