function Message::mergeFromString
Parses a protocol buffer contained in a string.
This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.
Parameters
string $data Binary protobuf data.:
Return value
null
Throws
\Exception Invalid data.
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php, line 751
Class
- Message
- Parent class of all proto messages. Users should not instantiate this class or extend this class or its child classes by their own. See the comment of specific functions for more details.
Namespace
Google\Protobuf\InternalCode
public function mergeFromString($data) {
$input = new CodedInputStream($data);
$this->parseFromStream($input);
}