Constants

COMMA

COMMA = ','

COLON

COLON = ':'

LBRACE

LBRACE = '{'

RBRACE

RBRACE = '}'

LBRACKET

LBRACKET = '['

RBRACKET

RBRACKET = ']'

QUOTE

QUOTE = '"'

NAME_MAP

NAME_MAP = "map"

NAME_LIST

NAME_LIST = "lst"

NAME_SET

NAME_SET = "set"

Properties

$trans_

$trans_ : \Thrift\Protocol\TTransport

Underlying transport

Type

\Thrift\Protocol\TTransport

$writeContext_

$writeContext_ : 

Type

$writeContextStack_

$writeContextStack_ : 

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(  $fieldName,   $fieldType,   $fieldId) 

Parameters

$fieldName
$fieldType
$fieldId

writeFieldEnd()

writeFieldEnd() 

writeFieldStop()

writeFieldStop() 

writeMapBegin()

writeMapBegin(  $keyType,   $valType,   $size) 

Parameters

$keyType
$valType
$size

writeMapEnd()

writeMapEnd() 

writeListBegin()

writeListBegin(  $elemType,   $size) 

Parameters

$elemType
$size

writeListEnd()

writeListEnd() 

writeSetBegin()

writeSetBegin(  $elemType,   $size) 

Parameters

$elemType
$size

writeSetEnd()

writeSetEnd() 

writeBool()

writeBool(  $bool) 

Parameters

$bool

writeByte()

writeByte(  $byte) 

Parameters

$byte

writeI16()

writeI16(  $i16) 

Parameters

$i16

writeI32()

writeI32(  $i32) 

Parameters

$i32

writeI64()

writeI64(  $i64) 

Parameters

$i64

writeDouble()

writeDouble(  $dub) 

Parameters

$dub

writeString()

writeString(  $str) 

Parameters

$str

readMessageBegin()

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

Reading methods.

simplejson is not meant to be read back into thrift

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,   $fieldType,   $fieldId) 

Parameters

$name
$fieldType
$fieldId

readFieldEnd()

readFieldEnd() 

readMapBegin()

readMapBegin(  $keyType,   $valType,   $size) 

Parameters

$keyType
$valType
$size

readMapEnd()

readMapEnd() 

readListBegin()

readListBegin(  $elemType,   $size) 

Parameters

$elemType
$size

readListEnd()

readListEnd() 

readSetBegin()

readSetBegin(  $elemType,   $size) 

Parameters

$elemType
$size

readSetEnd()

readSetEnd() 

readBool()

readBool(  $bool) 

Parameters

$bool

readByte()

readByte(  $byte) 

Parameters

$byte

readI16()

readI16(  $i16) 

Parameters

$i16

readI32()

readI32(  $i32) 

Parameters

$i32

readI64()

readI64(  $i64) 

Parameters

$i64

readDouble()

readDouble(  $dub) 

Parameters

$dub

readString()

readString(  $str) 

Parameters

$str

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

popWriteContext()

popWriteContext() 

Pop the last write context off the stack

assertContextIsNotMapKey()

assertContextIsNotMapKey(  $invalidKeyType) 

Used to make sure that we are not encountering a map whose keys are containers

Parameters

$invalidKeyType

writeJSONString()

writeJSONString(  $b) 

Parameters

$b

writeJSONInteger()

writeJSONInteger(  $num) 

Parameters

$num

writeJSONDouble()

writeJSONDouble(  $num) 

Parameters

$num