google/appengine/runtime/proto/ProtocolMessage.php
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\google\net\ProtocolMessage
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
copyFrom
(mixed $pb)
: void
Copies data from another protocol buffer into this protocol buffer.
Name | Type | Description |
---|---|---|
$pb | mixed |
The protocol buffer to copy from. |
isInitialized
()
: bool
Checks if this protocol message has all of the requried fields initialized.
Type | Description |
---|---|
bool | true if all fields are initialized, false otherwise. |
mergeFromString
(string $s)
: void
Like parseFromString, fills the message with a protocol buffer parsed from the given input string.
Name | Type | Description |
---|---|---|
$s | string |
The string containing a serialized protocol buffer. |
Exception | Description |
---|---|
\google\net\ProtocolBufferDecodeError | If the result message is not correctly initialized. |
mergePartialFromString
(string $s)
: void
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.
Name | Type | Description |
---|---|---|
$s | string |
The string containing a serialized protocol buffer. |
parseFromString
(string $s)
: void
Fills the message with a protocol buffer parsed from the given input string.
Name | Type | Description |
---|---|---|
$s | string |
The string containing a serialized protocol buffer. |
Exception | Description |
---|---|
\google\net\ProtocolBufferDecodeError | If the result message is not correctly initialized. |
parsePartialFromString
(string $s)
: void
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.
Name | Type | Description |
---|---|---|
$s | string |
The string containing a serialized protocol buffer. |
serializePartialToString
()
: string
Serializes a protocol buffer that might not have all of the required fields set.
Type | Description |
---|---|
string | The serialized protocol buffer. |
serializeToString
()
: string
Serializes the message and return it as a string.
Type | Description |
---|---|
string | The serialized protocol buffer. |
Exception | Description |
---|---|
\google\net\ProtocolBufferEncodeError | If the protocol buffer is not initialized. |