Protobuf

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

LOG_PHP_SDK

Methods

Returns a string representing this wiretype

get_wiretype( $wire_type) 
static

Arguments

$wire_type

read_double

read_double( $fp) 
static

Arguments

$fp

Read a unknown field from the stream and return its raw bytes

read_field( $fp,  $wire_type,  &$limit = null) 
static

Arguments

$fp

$wire_type

$limit

read_float

read_float( $fp) 
static

Arguments

$fp

read_int32

read_int32( $fp) 
static

Arguments

$fp

read_int64

read_int64( $fp) 
static

Arguments

$fp

read_uint32

read_uint32( $fp) 
static

Arguments

$fp

read_uint64

read_uint64( $fp) 
static

Arguments

$fp

Tries to read a varint from $fp.

read_varint( $fp,  &$limit = null) 
static
returns

the Varint from the stream, or false if the stream has reached eof.

Arguments

$fp

$limit

read_zint32

read_zint32( $fp) 
static

Arguments

$fp

read_zint64

read_zint64( $fp) 
static

Arguments

$fp

Returns how big (in bytes) this number would be as a varint

size_varint( $i) 
static

Arguments

$i

Seek past the current field

skip_field( $fp,  $wire_type) 
static

Arguments

$fp

$wire_type

Seek past a varint

skip_varint( $fp) 
static

Arguments

$fp

toString

toString( $key,  $value) 
static

Arguments

$key

$value

write_double

write_double( $fp,  $d) 
static

Arguments

$fp

$d

write_float

write_float( $fp,  $f) 
static

Arguments

$fp

$f

write_int32

write_int32( $fp,  $i) 
static

Arguments

$fp

$i

write_int64

write_int64( $fp,  $i) 
static

Arguments

$fp

$i

write_uint32

write_uint32( $fp,  $i) 
static

Arguments

$fp

$i

write_uint64

write_uint64( $fp,  $i) 
static

Arguments

$fp

$i

Writes a varint to $fp returns the number of bytes written

write_varint( $fp,  $i) : \The
static

Arguments

$fp

$i

The int to encode

Response

\The

number of bytes written

write_zint32

write_zint32( $fp,  $i) 
static

Arguments

$fp

$i

write_zint64

write_zint64( $fp,  $i) 
static

Arguments

$fp

$i

Constants

TYPE_DOUBLE

TYPE_DOUBLE

TYPE_FLOAT

TYPE_FLOAT

TYPE_INT64

TYPE_INT64

TYPE_UINT64

TYPE_UINT64

TYPE_INT32

TYPE_INT32

TYPE_FIXED64

TYPE_FIXED64

TYPE_FIXED32

TYPE_FIXED32

TYPE_BOOL

TYPE_BOOL

TYPE_STRING

TYPE_STRING

TYPE_GROUP

TYPE_GROUP

TYPE_MESSAGE

TYPE_MESSAGE

TYPE_BYTES

TYPE_BYTES

TYPE_UINT32

TYPE_UINT32

TYPE_ENUM

TYPE_ENUM

TYPE_SFIXED32

TYPE_SFIXED32

TYPE_SFIXED64

TYPE_SFIXED64

TYPE_SINT32

TYPE_SINT32

TYPE_SINT64

TYPE_SINT64

Properties

Used to aid in pretty printing of Protobuf objects

print_depth : 
static

Type(s)

indent_char

indent_char : 
static

Type(s)

print_limit

print_limit : 
static

Type(s)