public function start($data, array $metadata = [], array $options = [])
    {
        $message_array = ['message' => $this->_serializeMessage($data)];
        if (array_key_exists('flags', $options)) {
            $message_array['flags'] = $options['flags'];
        }
        $this->call->startBatch([
            OP_SEND_INITIAL_METADATA => $metadata,
            OP_SEND_MESSAGE => $message_array,
            OP_SEND_CLOSE_FROM_CLIENT => true,
        ]);
    }
public function start($data, array $metadata = [], array $options = [])
    {
        $message_array = ['message' => $this->_serializeMessage($data)];
        if (array_key_exists('flags', $options)) {
            $message_array['flags'] = $options['flags'];
        }
        $this->call->startBatch([
            OP_SEND_INITIAL_METADATA => $metadata,
            OP_SEND_MESSAGE => $message_array,
            OP_SEND_CLOSE_FROM_CLIENT => true,
        ]);
    }
public function start ( $ data , array $ metadata = [ ] , array $ options = [ ] ) { $ message_array = [ 'message' => $ this -> _serializeMessage ( $ data ) ] ; if ( array_key_exists ( 'flags' , $ options ) ) { $ message_array [ 'flags' ] = $ options [ 'flags' ] ; } $ this -> call -> startBatch ( [ OP_SEND_INITIAL_METADATA => $ metadata , OP_SEND_MESSAGE => $ message_array , OP_SEND_CLOSE_FROM_CLIENT => true , ] ) ; }
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)
Start the call .