function Message::readWrapperValue
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php, line 158
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
protected function readWrapperValue($member) {
$field = $this->desc
->getFieldByName($member);
$oneof_index = $field->getOneofIndex();
if ($oneof_index === -1) {
$wrapper = $this->{$member};
}
else {
$wrapper = $this->readOneof($field->getNumber());
}
if (is_null($wrapper)) {
return NULL;
}
else {
return $wrapper->getValue();
}
}