CompactProtocol
Constants
- COMPACT_BINARY = 0x8
- COMPACT_BYTE = 0x3
- COMPACT_DOUBLE = 0x7
- COMPACT_FALSE = 0x2
- COMPACT_I16 = 0x4
- COMPACT_I32 = 0x5
- COMPACT_I64 = 0x6
- COMPACT_LIST = 0x9
- COMPACT_MAP = 0xb
- COMPACT_SET = 0xa
- COMPACT_STOP = 0x0
- COMPACT_STRUCT = 0xc
- COMPACT_TRUE = 0x1
- PROTOCOL_ID = 0x82
- STATE_BOOL_READ = 8
- STATE_BOOL_WRITE = 4
- STATE_CLEAR = 0
- STATE_CONTAINER_READ = 6
- STATE_CONTAINER_WRITE = 3
- STATE_FIELD_READ = 5
- STATE_FIELD_WRITE = 1
- STATE_VALUE_READ = 7
- STATE_VALUE_WRITE = 2
- TYPE_BITS = 0x7
- TYPE_MASK = 0xe0
- TYPE_SHIFT_AMOUNT = 5
- VERSION = 1
- VERSION_MASK = 0x1f
Methods
- __construct() : mixed
- fromZigZag() : int
- getTransport() : Transport
- getTType() : int
- getVarint() : string
- readBool() : int
- readByte() : int
- readCollectionBegin() : int
- readCollectionEnd() : int
- readDouble() : int
- readFieldBegin() : int
- readFieldEnd() : int
- readI16() : int
- readI32() : int
- readI64() : int
- If we are on a 32bit architecture we have to explicitly deal with 64-bit twos-complement arithmetic since PHP wants to treat all ints as signed and any int over 2^31 - 1 as a float.
- readListBegin() : int
- readListEnd() : int
- readMapBegin() : int
- readMapEnd() : int
- readMessageBegin() : int
- readMessageEnd() : int
- readSetBegin() : int
- readSetEnd() : int
- readString() : int
- readStructBegin() : int
- readStructEnd() : int
- readUByte() : int
- readVarint() : int
- readZigZag() : int
- skip() : mixed
- toZigZag() : int
- writeBool() : int
- writeByte() : int
- writeCollectionBegin() : int
- writeCollectionEnd() : int
- writeDouble() : int
- writeFieldBegin() : int
- writeFieldEnd() : int
- writeFieldHeader() : int
- writeFieldStop() : int
- writeI16() : int
- writeI32() : int
- writeI64() : int
- writeListBegin() : int
- writeListEnd() : int
- writeMapBegin() : int
- writeMapEnd() : int
- writeMessageBegin() : int
- writeMessageEnd() : int
- writeSetBegin() : int
- writeSetEnd() : int
- writeString() : int
- writeStructBegin() : int
- writeStructEnd() : int
- writeUByte() : int
- writeVarint() : int
Constants
COMPACT_BINARY
public
mixed
COMPACT_BINARY
= 0x8
COMPACT_BYTE
public
mixed
COMPACT_BYTE
= 0x3
COMPACT_DOUBLE
public
mixed
COMPACT_DOUBLE
= 0x7
COMPACT_FALSE
public
mixed
COMPACT_FALSE
= 0x2
COMPACT_I16
public
mixed
COMPACT_I16
= 0x4
COMPACT_I32
public
mixed
COMPACT_I32
= 0x5
COMPACT_I64
public
mixed
COMPACT_I64
= 0x6
COMPACT_LIST
public
mixed
COMPACT_LIST
= 0x9
COMPACT_MAP
public
mixed
COMPACT_MAP
= 0xb
COMPACT_SET
public
mixed
COMPACT_SET
= 0xa
COMPACT_STOP
public
mixed
COMPACT_STOP
= 0x0
COMPACT_STRUCT
public
mixed
COMPACT_STRUCT
= 0xc
COMPACT_TRUE
public
mixed
COMPACT_TRUE
= 0x1
PROTOCOL_ID
public
mixed
PROTOCOL_ID
= 0x82
STATE_BOOL_READ
public
mixed
STATE_BOOL_READ
= 8
STATE_BOOL_WRITE
public
mixed
STATE_BOOL_WRITE
= 4
STATE_CLEAR
public
mixed
STATE_CLEAR
= 0
STATE_CONTAINER_READ
public
mixed
STATE_CONTAINER_READ
= 6
STATE_CONTAINER_WRITE
public
mixed
STATE_CONTAINER_WRITE
= 3
STATE_FIELD_READ
public
mixed
STATE_FIELD_READ
= 5
STATE_FIELD_WRITE
public
mixed
STATE_FIELD_WRITE
= 1
STATE_VALUE_READ
public
mixed
STATE_VALUE_READ
= 7
STATE_VALUE_WRITE
public
mixed
STATE_VALUE_WRITE
= 2
TYPE_BITS
public
mixed
TYPE_BITS
= 0x7
TYPE_MASK
public
mixed
TYPE_MASK
= 0xe0
TYPE_SHIFT_AMOUNT
public
mixed
TYPE_SHIFT_AMOUNT
= 5
VERSION
public
mixed
VERSION
= 1
VERSION_MASK
public
mixed
VERSION_MASK
= 0x1f
Methods
__construct()
public
__construct(Transport $transport) : mixed
Parameters
- $transport : Transport
fromZigZag()
public
fromZigZag(int $n) : int
Parameters
- $n : int
Return values
intgetTransport()
public
getTransport() : Transport
Return values
TransportgetTType()
public
getTType(int $byte) : int
Parameters
- $byte : int
Return values
intgetVarint()
public
getVarint(int $data) : string
Parameters
- $data : int
Return values
stringreadBool()
public
readBool(mixed &$bool) : int
Parameters
- $bool : mixed
Return values
intreadByte()
public
readByte(mixed &$byte) : int
Parameters
- $byte : mixed
Return values
intreadCollectionBegin()
public
readCollectionBegin(mixed &$type, mixed &$size) : int
Parameters
- $type : mixed
- $size : mixed
Return values
intreadCollectionEnd()
public
readCollectionEnd() : int
Return values
intreadDouble()
public
readDouble(mixed &$dub) : int
Parameters
- $dub : mixed
Return values
intreadFieldBegin()
public
readFieldBegin(mixed &$name, mixed &$fieldType, mixed &$fieldId) : int
Parameters
- $name : mixed
- $fieldType : mixed
- $fieldId : mixed
Return values
intreadFieldEnd()
public
readFieldEnd() : int
Return values
intreadI16()
public
readI16(mixed &$i16) : int
Parameters
- $i16 : mixed
Return values
intreadI32()
public
readI32(mixed &$i32) : int
Parameters
- $i32 : mixed
Return values
intreadI64()
If we are on a 32bit architecture we have to explicitly deal with 64-bit twos-complement arithmetic since PHP wants to treat all ints as signed and any int over 2^31 - 1 as a float.
public
readI64(mixed &$i64) : int
Read and write I64 as two 32 bit numbers $hi and $lo
Parameters
- $i64 : mixed
Tags
Return values
intreadListBegin()
public
readListBegin(mixed &$elemType, mixed &$size) : int
Parameters
- $elemType : mixed
- $size : mixed
Return values
intreadListEnd()
public
readListEnd() : int
Return values
intreadMapBegin()
public
readMapBegin(mixed &$keyType, mixed &$valType, mixed &$size) : int
Parameters
- $keyType : mixed
- $valType : mixed
- $size : mixed
Return values
intreadMapEnd()
public
readMapEnd() : int
Return values
intreadMessageBegin()
public
readMessageBegin(mixed &$name, mixed &$type, mixed &$seqid) : int
Parameters
- $name : mixed
- $type : mixed
- $seqid : mixed
Return values
intreadMessageEnd()
public
readMessageEnd() : int
Return values
intreadSetBegin()
public
readSetBegin(mixed &$elemType, mixed &$size) : int
Parameters
- $elemType : mixed
- $size : mixed
Return values
intreadSetEnd()
public
readSetEnd() : int
Return values
intreadString()
public
readString(mixed &$str) : int
Parameters
- $str : mixed
Return values
intreadStructBegin()
public
readStructBegin(mixed &$name) : int
Parameters
- $name : mixed
Return values
intreadStructEnd()
public
readStructEnd() : int
Return values
intreadUByte()
public
readUByte(mixed &$value) : int
Parameters
- $value : mixed
Return values
intreadVarint()
public
readVarint(mixed &$result) : int
Parameters
- $result : mixed
Return values
intreadZigZag()
public
readZigZag(mixed &$value) : int
Parameters
- $value : mixed
Return values
intskip()
public
skip(mixed $type) : mixed
Parameters
- $type : mixed
toZigZag()
public
toZigZag(mixed $n, mixed $bits) : int
Parameters
- $n : mixed
- $bits : mixed
Return values
intwriteBool()
public
writeBool(mixed $bool) : int
Parameters
- $bool : mixed
Return values
intwriteByte()
public
writeByte(int $byte) : int
Parameters
- $byte : int
Return values
intwriteCollectionBegin()
public
writeCollectionBegin(int $etype, int $size) : int
Parameters
- $etype : int
- $size : int
Return values
intwriteCollectionEnd()
public
writeCollectionEnd() : int
Return values
intwriteDouble()
public
writeDouble(float $dub) : int
Parameters
- $dub : float
Return values
intwriteFieldBegin()
public
writeFieldBegin(string $fieldName, int $fieldType, int $fieldId) : int
Parameters
- $fieldName : string
- $fieldType : int
- $fieldId : int
Return values
intwriteFieldEnd()
public
writeFieldEnd() : int
Return values
intwriteFieldHeader()
public
writeFieldHeader(int $type, int $fid) : int
Parameters
- $type : int
- $fid : int
Return values
intwriteFieldStop()
public
writeFieldStop() : int
Return values
intwriteI16()
public
writeI16(int $value) : int
Parameters
- $value : int
Return values
intwriteI32()
public
writeI32(int $value) : int
Parameters
- $value : int
Return values
intwriteI64()
public
writeI64(int $value) : int
Parameters
- $value : int
Return values
intwriteListBegin()
public
writeListBegin(mixed $elemType, mixed $size) : int
Parameters
- $elemType : mixed
- $size : mixed
Return values
intwriteListEnd()
public
writeListEnd() : int
Return values
intwriteMapBegin()
public
writeMapBegin(int $keyType, int $valType, int $size) : int
Parameters
- $keyType : int
- $valType : int
- $size : int
Return values
intwriteMapEnd()
public
writeMapEnd() : int
Return values
intwriteMessageBegin()
public
writeMessageBegin(string $name, int $type, int $seqid) : int
Parameters
- $name : string
- $type : int
- $seqid : int
Return values
intwriteMessageEnd()
public
writeMessageEnd() : int
Return values
intwriteSetBegin()
public
writeSetBegin(int $elemType, int $size) : int
Parameters
- $elemType : int
- $size : int
Return values
intwriteSetEnd()
public
writeSetEnd() : int
Return values
intwriteString()
public
writeString(string $value) : int
Parameters
- $value : string
Return values
intwriteStructBegin()
public
writeStructBegin() : int
Return values
intwriteStructEnd()
public
writeStructEnd() : int
Return values
intwriteUByte()
public
writeUByte(int $byte) : int
Parameters
- $byte : int
Return values
intwriteVarint()
public
writeVarint(int $data) : int
Parameters
- $data : int