Grpc\AbstractCall::serializeMessage PHP Метод

serializeMessage() защищенный Метод

Serialize a message to the protobuf binary format.
protected serializeMessage ( mixed $data ) : string
$data mixed The Protobuf message
Результат string The protobuf binary format
    protected function serializeMessage($data)
    {
        // Proto3 implementation
        if (method_exists($data, 'encode')) {
            return $data->encode();
        }
        // Protobuf-PHP implementation
        return $data->serialize();
    }