Flow PHP

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

Methods

fromZigZag()

public fromZigZag(int $n) : int
Parameters
$n : int
Return values
int

getTType()

public getTType(int $byte) : int
Parameters
$byte : int
Return values
int

getVarint()

public getVarint(int $data) : string
Parameters
$data : int
Return values
string

readBool()

public readBool(mixed &$bool) : int
Parameters
$bool : mixed
Return values
int

readByte()

public readByte(mixed &$byte) : int
Parameters
$byte : mixed
Return values
int

readCollectionBegin()

public readCollectionBegin(mixed &$type, mixed &$size) : int
Parameters
$type : mixed
$size : mixed
Return values
int

readCollectionEnd()

public readCollectionEnd() : int
Return values
int

readDouble()

public readDouble(mixed &$dub) : int
Parameters
$dub : mixed
Return values
int

readFieldBegin()

public readFieldBegin(mixed &$name, mixed &$fieldType, mixed &$fieldId) : int
Parameters
$name : mixed
$fieldType : mixed
$fieldId : mixed
Return values
int

readI16()

public readI16(mixed &$i16) : int
Parameters
$i16 : mixed
Return values
int

readI32()

public readI32(mixed &$i32) : int
Parameters
$i32 : mixed
Return values
int

readI64()

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
throws
TTransportException
Return values
int

readListBegin()

public readListBegin(mixed &$elemType, mixed &$size) : int
Parameters
$elemType : mixed
$size : mixed
Return values
int

readMapBegin()

public readMapBegin(mixed &$keyType, mixed &$valType, mixed &$size) : int
Parameters
$keyType : mixed
$valType : mixed
$size : mixed
Return values
int

readMessageBegin()

public readMessageBegin(mixed &$name, mixed &$type, mixed &$seqid) : int
Parameters
$name : mixed
$type : mixed
$seqid : mixed
Return values
int

readSetBegin()

public readSetBegin(mixed &$elemType, mixed &$size) : int
Parameters
$elemType : mixed
$size : mixed
Return values
int

readString()

public readString(mixed &$str) : int
Parameters
$str : mixed
Return values
int

readStructBegin()

public readStructBegin(mixed &$name) : int
Parameters
$name : mixed
Return values
int

readUByte()

public readUByte(mixed &$value) : int
Parameters
$value : mixed
Return values
int

readVarint()

public readVarint(mixed &$result) : int
Parameters
$result : mixed
Return values
int

readZigZag()

public readZigZag(mixed &$value) : int
Parameters
$value : mixed
Return values
int

toZigZag()

public toZigZag(mixed $n, mixed $bits) : int
Parameters
$n : mixed
$bits : mixed
Return values
int

writeBool()

public writeBool(mixed $bool) : int
Parameters
$bool : mixed
Return values
int

writeByte()

public writeByte(int $byte) : int
Parameters
$byte : int
Return values
int

writeCollectionBegin()

public writeCollectionBegin(int $etype, int $size) : int
Parameters
$etype : int
$size : int
Return values
int

writeCollectionEnd()

public writeCollectionEnd() : int
Return values
int

writeDouble()

public writeDouble(float $dub) : int
Parameters
$dub : float
Return values
int

writeFieldBegin()

public writeFieldBegin(string $fieldName, int $fieldType, int $fieldId) : int
Parameters
$fieldName : string
$fieldType : int
$fieldId : int
Return values
int

writeFieldHeader()

public writeFieldHeader(int $type, int $fid) : int
Parameters
$type : int
$fid : int
Return values
int

writeI16()

public writeI16(int $value) : int
Parameters
$value : int
Return values
int

writeI32()

public writeI32(int $value) : int
Parameters
$value : int
Return values
int

writeI64()

public writeI64(int $value) : int
Parameters
$value : int
Return values
int

writeListBegin()

public writeListBegin(mixed $elemType, mixed $size) : int
Parameters
$elemType : mixed
$size : mixed
Return values
int

writeMapBegin()

public writeMapBegin(int $keyType, int $valType, int $size) : int
Parameters
$keyType : int
$valType : int
$size : int
Return values
int

writeMessageBegin()

public writeMessageBegin(string $name, int $type, int $seqid) : int
Parameters
$name : string
$type : int
$seqid : int
Return values
int

writeSetBegin()

public writeSetBegin(int $elemType, int $size) : int
Parameters
$elemType : int
$size : int
Return values
int

writeString()

public writeString(string $value) : int
Parameters
$value : string
Return values
int

writeStructBegin()

public writeStructBegin() : int
Return values
int

writeUByte()

public writeUByte(int $byte) : int
Parameters
$byte : int
Return values
int

writeVarint()

public writeVarint(int $data) : int
Parameters
$data : int
Return values
int

        
On this page

Search results