\Thrift\ProtocolTCompactProtocol

Compact implementation of the Thrift protocol.

Summary

Methods
Properties
Constants
__construct()
getTransport()
writeMessageBegin()
writeMessageEnd()
writeStructBegin()
writeStructEnd()
writeFieldBegin()
writeFieldEnd()
writeFieldStop()
writeMapBegin()
writeMapEnd()
writeListBegin()
writeListEnd()
writeSetBegin()
writeSetEnd()
writeBool()
writeByte()
writeI16()
writeI32()
writeI64()
writeDouble()
writeString()
readMessageBegin()
readMessageEnd()
readStructBegin()
readStructEnd()
readFieldBegin()
readFieldEnd()
readMapBegin()
readMapEnd()
readListBegin()
readListEnd()
readSetBegin()
readSetEnd()
readBool()
readByte()
readI16()
readI32()
readI64()
readDouble()
readString()
skip()
skipBinary()
toZigZag()
fromZigZag()
getVarint()
writeVarint()
readVarint()
writeFieldHeader()
writeCollectionBegin()
writeCollectionEnd()
writeUByte()
readUByte()
readZigZag()
readCollectionBegin()
readCollectionEnd()
getTType()
No public properties found
COMPACT_STOP
COMPACT_TRUE
COMPACT_FALSE
COMPACT_BYTE
COMPACT_I16
COMPACT_I32
COMPACT_I64
COMPACT_DOUBLE
COMPACT_BINARY
COMPACT_LIST
COMPACT_SET
COMPACT_MAP
COMPACT_STRUCT
STATE_CLEAR
STATE_FIELD_WRITE
STATE_VALUE_WRITE
STATE_CONTAINER_WRITE
STATE_BOOL_WRITE
STATE_FIELD_READ
STATE_CONTAINER_READ
STATE_VALUE_READ
STATE_BOOL_READ
VERSION_MASK
VERSION
PROTOCOL_ID
TYPE_MASK
TYPE_BITS
TYPE_SHIFT_AMOUNT
No protected methods found
$trans_
$ctypes
$ttypes
$state
$lastFid
$boolFid
$boolValue
$structs
$containers
N/A
No private methods found
No private properties found
N/A

Constants

COMPACT_STOP

COMPACT_STOP = 0

COMPACT_TRUE

COMPACT_TRUE = 1

COMPACT_FALSE

COMPACT_FALSE = 2

COMPACT_BYTE

COMPACT_BYTE = 3

COMPACT_I16

COMPACT_I16 = 4

COMPACT_I32

COMPACT_I32 = 5

COMPACT_I64

COMPACT_I64 = 6

COMPACT_DOUBLE

COMPACT_DOUBLE = 7

COMPACT_BINARY

COMPACT_BINARY = 8

COMPACT_LIST

COMPACT_LIST = 9

COMPACT_SET

COMPACT_SET = 10

COMPACT_MAP

COMPACT_MAP = 11

COMPACT_STRUCT

COMPACT_STRUCT = 12

STATE_CLEAR

STATE_CLEAR = 0

STATE_FIELD_WRITE

STATE_FIELD_WRITE = 1

STATE_VALUE_WRITE

STATE_VALUE_WRITE = 2

STATE_CONTAINER_WRITE

STATE_CONTAINER_WRITE = 3

STATE_BOOL_WRITE

STATE_BOOL_WRITE = 4

STATE_FIELD_READ

STATE_FIELD_READ = 5

STATE_CONTAINER_READ

STATE_CONTAINER_READ = 6

STATE_VALUE_READ

STATE_VALUE_READ = 7

STATE_BOOL_READ

STATE_BOOL_READ = 8

VERSION_MASK

VERSION_MASK = 31

VERSION

VERSION = 1

PROTOCOL_ID

PROTOCOL_ID = 130

TYPE_MASK

TYPE_MASK = 224

TYPE_BITS

TYPE_BITS = 7

TYPE_SHIFT_AMOUNT

TYPE_SHIFT_AMOUNT = 5

Properties

$trans_

$trans_ : \Thrift\Protocol\TTransport

Underlying transport

Type

\Thrift\Protocol\TTransport

$ctypes

$ctypes : 

Type

$ttypes

$ttypes : 

Type

$state

$state : 

Type

$lastFid

$lastFid : 

Type

$boolFid

$boolFid : 

Type

$boolValue

$boolValue : 

Type

$structs

$structs : 

Type

$containers

$containers : 

Type

Methods

__construct()

__construct(  $trans) 

Constructor

Parameters

$trans

getTransport()

getTransport() : \Thrift\Protocol\TTransport

Accessor for transport

Returns

\Thrift\Protocol\TTransport

writeMessageBegin()

writeMessageBegin(string  $name, integer  $type, integer  $seqid) 

Writes the message header

Parameters

string $name

Function name

integer $type

message type TMessageType::CALL or TMessageType::REPLY

integer $seqid

The sequence id of this message

writeMessageEnd()

writeMessageEnd() 

Close the message

writeStructBegin()

writeStructBegin(string  $name) : integer

Writes a struct header.

Parameters

string $name

Struct name

Returns

integer —

How many bytes written

writeStructEnd()

writeStructEnd() : integer

Close a struct.

Returns

integer —

How many bytes written

writeFieldBegin()

writeFieldBegin(  $field_name,   $field_type,   $field_id) 

Parameters

$field_name
$field_type
$field_id

writeFieldEnd()

writeFieldEnd() 

writeFieldStop()

writeFieldStop() 

writeMapBegin()

writeMapBegin(  $key_type,   $val_type,   $size) 

Parameters

$key_type
$val_type
$size

writeMapEnd()

writeMapEnd() 

writeListBegin()

writeListBegin(  $elem_type,   $size) 

Parameters

$elem_type
$size

writeListEnd()

writeListEnd() 

writeSetBegin()

writeSetBegin(  $elem_type,   $size) 

Parameters

$elem_type
$size

writeSetEnd()

writeSetEnd() 

writeBool()

writeBool(  $value) 

Parameters

$value

writeByte()

writeByte(  $value) 

Parameters

$value

writeI16()

writeI16(  $value) 

Parameters

$value

writeI32()

writeI32(  $value) 

Parameters

$value

writeI64()

writeI64(  $value) 

Parameters

$value

writeDouble()

writeDouble(  $value) 

Parameters

$value

writeString()

writeString(  $value) 

Parameters

$value

readMessageBegin()

readMessageBegin(string  $name, integer  $type,   $seqid) 

Reads the message header

Parameters

string $name

Function name

integer $type

message type TMessageType::CALL or TMessageType::REPLY

$seqid

readMessageEnd()

readMessageEnd() 

Read the close of message

readStructBegin()

readStructBegin(  $name) 

Parameters

$name

readStructEnd()

readStructEnd() 

readFieldBegin()

readFieldBegin(  $name,   $field_type,   $field_id) 

Parameters

$name
$field_type
$field_id

readFieldEnd()

readFieldEnd() 

readMapBegin()

readMapBegin(  $key_type,   $val_type,   $size) 

Parameters

$key_type
$val_type
$size

readMapEnd()

readMapEnd() 

readListBegin()

readListBegin(  $elem_type,   $size) 

Parameters

$elem_type
$size

readListEnd()

readListEnd() 

readSetBegin()

readSetBegin(  $elem_type,   $size) 

Parameters

$elem_type
$size

readSetEnd()

readSetEnd() 

readBool()

readBool(  $value) 

Parameters

$value

readByte()

readByte(  $value) 

Parameters

$value

readI16()

readI16(  $value) 

Parameters

$value

readI32()

readI32(  $value) 

Parameters

$value

readI64()

readI64(  $value) 

Parameters

$value

readDouble()

readDouble(  $value) 

Parameters

$value

readString()

readString(  $value) 

Parameters

$value

skip()

skip(\Thrift\Type\TType  $type) 

The skip function is a utility to parse over unrecognized date without causing corruption.

Parameters

\Thrift\Type\TType $type

What type is it

skipBinary()

skipBinary(\Thrift\Protocol\TTransport  $itrans, integer  $type) 

Utility for skipping binary data

Parameters

\Thrift\Protocol\TTransport $itrans

TTransport object

integer $type

Field type

toZigZag()

toZigZag(  $n,   $bits) 

Parameters

$n
$bits

fromZigZag()

fromZigZag(  $n) 

Parameters

$n

getVarint()

getVarint(  $data) 

Parameters

$data

writeVarint()

writeVarint(  $data) 

Parameters

$data

readVarint()

readVarint(  $result) 

Parameters

$result

writeFieldHeader()

writeFieldHeader(  $type,   $fid) 

Parameters

$type
$fid

writeCollectionBegin()

writeCollectionBegin(  $etype,   $size) 

Parameters

$etype
$size

writeCollectionEnd()

writeCollectionEnd() 

writeUByte()

writeUByte(  $byte) 

Parameters

$byte

readUByte()

readUByte(  $value) 

Parameters

$value

readZigZag()

readZigZag(  $value) 

Parameters

$value

readCollectionBegin()

readCollectionBegin(  $type,   $size) 

Parameters

$type
$size

readCollectionEnd()

readCollectionEnd() 

getTType()

getTType(  $byte) 

Parameters

$byte