ProtocolMessage
abstract class ProtocolMessage (View source)
The parent class of all protocol buffers.
Subclasses are automatically generated by php protocol buffer compiler. Encoding methods can raise ProtocolBufferEncodeError if a value for an integer or long field is too large, or if any required field is not set. Decoding methods can raise ProtocolBufferDecodeError if they couldn't decode correctly, or the decoded message doesn't have all required fields.
Methods
Serializes the message and return it as a string.
Serializes a protocol buffer that might not have all of the required fields set.
Fills the message with a protocol buffer parsed from the given input string.
Fills the message with a protocol buffer parsed from the given input string. Will not fail if the resulting protocol buffer is not fully initialized.
Like parseFromString, fills the message with a protocol buffer parsed from the given input string.
Like parsePartialFromString, fills the message with a protocol buffer parsed from the given input string. Will not fail if the resulting protocol buffer is not fully initialized.
Copies data from another protocol buffer into this protocol buffer.
Checks if this protocol message has all of the requried fields initialized.
No description
No description
No description
No description
No description
No description
No description
No description
Format protocol buffer as a text string for debugging.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Checks if two integers are equal.
Details
at line 39
string
serializeToString()
Serializes the message and return it as a string.
at line 54
string
serializePartialToString()
Serializes a protocol buffer that might not have all of the required fields set.
at line 77
parseFromString(string $s)
Fills the message with a protocol buffer parsed from the given input string.
at line 92
parsePartialFromString(string $s)
Fills the message with a protocol buffer parsed from the given input string. Will not fail if the resulting protocol buffer is not fully initialized.
at line 108
mergeFromString(string $s)
Like parseFromString, fills the message with a protocol buffer parsed from the given input string.
at line 128
mergePartialFromString(string $s)
Like parsePartialFromString, fills the message with a protocol buffer parsed from the given input string. Will not fail if the resulting protocol buffer is not fully initialized.
at line 140
copyFrom(mixed $pb)
Copies data from another protocol buffer into this protocol buffer.
at line 154
bool
isInitialized()
Checks if this protocol message has all of the requried fields initialized.
at line 159
abstract
checkInitialized()
at line 160
abstract
tryMerge($decoder)
at line 161
abstract
outputPartial($encoder)
at line 162
abstract
byteSizePartial()
at line 163
abstract
clear()
at line 164
abstract
mergeFrom($proto)
at line 165
abstract
equals($proto)
at line 166
abstract
shortDebugString()
at line 171
static protected
debugFormatString($value)
Format protocol buffer as a text string for debugging.
at line 181
static protected
debugFormatDouble($value)
at line 192
static protected
lengthVarUint64($value)
at line 227
static protected
lengthVarInt64($value)
at line 241
static protected
lengthVarInt32($value)
at line 245
static protected
lengthString($len)
at line 249
static protected
debugFormatBool($b)
at line 259
static protected
debugFormatFloat($value)
at line 263
static protected
debugFormatFixed32($value)
at line 268
static protected
debugFormatFixed64($value)
at line 290
static protected
debugFormatInt32($value)
at line 296
static protected
debugFormatInt64($value)
at line 303
protected
checkProtoArray($arr)
at line 322
static protected bool
integerEquals(int $a, int $b)
Checks if two integers are equal.