Constants

VERSION_MASK

VERSION_MASK

VERSION_1

VERSION_1

Properties

$TBINARYPROTOCOLACCELERATED

$TBINARYPROTOCOLACCELERATED : 

Type

$trans_

$trans_ : \TTransport

Underlying transport

Type

\TTransport

$strictRead_

$strictRead_ : 

Type

$strictWrite_

$strictWrite_ : 

Type

Methods

__construct()

__construct(  $trans,   $strictRead = false,   $strictWrite = true) 

Constructor

Parameters

$trans
$strictRead
$strictWrite

getTransport()

getTransport() : \TTransport

Accessor for transport

Returns

\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(  $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,   $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(  $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(\TType  $type) 

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

Parameters

\TType $type

What type is it

skipBinary()

skipBinary(\TTransport  $itrans, integer  $type) 

Utility for skipping binary data

Parameters

\TTransport $itrans

TTransport object

integer $type

Field type