Constants

WIRED_VARINT

WIRED_VARINT = 0

WIRED_64BIT

WIRED_64BIT = 1

WIRED_LENGTH_DELIMITED

WIRED_LENGTH_DELIMITED = 2

WIRED_START_GROUP

WIRED_START_GROUP = 3

WIRED_END_GROUP

WIRED_END_GROUP = 4

WIRED_32BIT

WIRED_32BIT = 5

MODUS

MODUS = 1

Properties

$base128

$base128 : 

Type

$fields

$fields : 

Type

$values

$values : 

Type

$wired_type

$wired_type : 

Type

$value

$value : 

Type

$chunk

$chunk : 

Type

$_d_string

$_d_string : 

Type

$reader

$reader : 

Type

Methods

__construct()

__construct(  $reader = null) 

Constructor - initialize base128 class

Parameters

$reader

get_types()

get_types(  $number) : array

Get the wired_type and field_type

Parameters

$number

as decimal

Returns

array —

wired_type, field_type

SerializeToString()

SerializeToString(  $rec = -1) : string

Encodes a Message

Parameters

$rec

Returns

string —

the encoded message

_serialize_chunk()

_serialize_chunk(String  $stringinner) 

Serializes the chunk

Parameters

String $stringinner
  • String where to append the chunk

ParseFromString()

ParseFromString(  $message) 

Decodes a Message and Built its things

Parameters

$message

ParseFromArray()

ParseFromArray() 

Internal function

Send()

Send(  $url,   $class = null) : String

Sends the message via post request ['message'] to the url

Parameters

$url
$class

Returns

String —
  • the return string from the request to the url

taskId()

taskId() 

set_taskId()

set_taskId(  $value) 

Parameters

$value

appkey()

appkey() 

set_appkey()

set_appkey(  $value) 

Parameters

$value

appId()

appId() 

set_appId()

set_appId(  $value) 

Parameters

$value

seqId()

seqId() 

set_seqId()

set_seqId(  $value) 

Parameters

$value

_add_arr_value()

_add_arr_value(  $index) 

Add an array value

Parameters

$index

_set_arr_value()

_set_arr_value(  $index,   $index_arr,   $value) 

Set an array value - @TODO failure check

Parameters

$index
$index_arr
$value

_remove_last_arr_value()

_remove_last_arr_value(  $index) 

Remove the last array value

Parameters

$index

_set_value()

_set_value(  $index,   $value) 

Set an value

Parameters

$index
$value

_get_value()

_get_value(  $index) 

Get a value

Parameters

$index

_get_arr_value()

_get_arr_value(  $index,   $value) 

Get array value

Parameters

$index
$value

_get_arr_size()

_get_arr_size(  $index) 

Get array size

Parameters

$index

_save_string()

_save_string(  $ch,   $string) 

Helper method for send string

Parameters

$ch
$string

_ParseFromArray()

_ParseFromArray(  $length = 99999999) 

Internal function

Parameters

$length