function Message::__debugInfo
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php, line 2019
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 __debugInfo() {
if (is_a($this, 'Google\\Protobuf\\FieldMask')) {
return [
'paths' => $this->getPaths()
->__debugInfo(),
];
}
if (is_a($this, 'Google\\Protobuf\\Value')) {
switch ($this->getKind()) {
case 'null_value':
return [
'nullValue' => $this->getNullValue(),
];
case 'number_value':
return [
'numberValue' => $this->getNumberValue(),
];
case 'string_value':
return [
'stringValue' => $this->getStringValue(),
];
case 'bool_value':
return [
'boolValue' => $this->getBoolValue(),
];
case 'struct_value':
return [
'structValue' => $this->getStructValue()
->__debugInfo(),
];
case 'list_value':
return [
'listValue' => $this->getListValue()
->__debugInfo(),
];
}
return [];
}
if (is_a($this, 'Google\\Protobuf\\BoolValue') || is_a($this, 'Google\\Protobuf\\BytesValue') || is_a($this, 'Google\\Protobuf\\DoubleValue') || is_a($this, 'Google\\Protobuf\\FloatValue') || is_a($this, 'Google\\Protobuf\\StringValue') || is_a($this, 'Google\\Protobuf\\Int32Value') || is_a($this, 'Google\\Protobuf\\Int64Value') || is_a($this, 'Google\\Protobuf\\UInt32Value') || is_a($this, 'Google\\Protobuf\\UInt64Value')) {
return [
'value' => json_decode($this->serializeToJsonString(), true),
];
}
if (is_a($this, 'Google\\Protobuf\\Duration') || is_a($this, 'Google\\Protobuf\\Timestamp')) {
return [
'seconds' => $this->getSeconds(),
'nanos' => $this->getNanos(),
];
}
return json_decode($this->serializeToJsonString(), true);
}