Class to aid in the parsing and creating of Protocol Buffer Messages This class should be included by the developer before they use a generated protobuf class.
author | Andrew Brampton |
---|---|
package | SLS_PHP_SDK |
get_wiretype($wire_type)
read_double($fp)
read_field($fp, $wire_type, $limit = null
)
read_float($fp)
read_int32($fp)
read_int64($fp)
read_uint32($fp)
read_uint64($fp)
read_varint($fp, $limit = null
)
returns | the Varint from the stream, or false if the stream has reached eof. |
---|
read_zint32($fp)
read_zint64($fp)
size_varint($i)
skip_field($fp, $wire_type)
skip_varint($fp)
toString($key, $value)
write_double($fp, $d)
write_float($fp, $f)
write_int32($fp, $i)
write_int64($fp, $i)
write_uint32($fp, $i)
write_uint64($fp, $i)
write_varint($fp, $i) : \The
The int to encode
\The
number of bytes writtenwrite_zint32($fp, $i)
write_zint64($fp, $i)
$indent_char
"\t"
$print_depth
0
$print_limit
50
TYPE_BOOL = 8
TYPE_BYTES = 12
TYPE_DOUBLE = 1
TYPE_ENUM = 14
TYPE_FIXED32 = 7
TYPE_FIXED64 = 6
TYPE_FLOAT = 2
TYPE_GROUP = 10
TYPE_INT32 = 5
TYPE_INT64 = 3
TYPE_MESSAGE = 11
TYPE_SFIXED32 = 15
TYPE_SFIXED64 = 16
TYPE_SINT32 = 17
TYPE_SINT64 = 18
TYPE_STRING = 9
TYPE_UINT32 = 13
TYPE_UINT64 = 4