function Message::hasOneof
27 calls to Message::hasOneof()
- AnyValue::hasArrayValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php - AnyValue::hasBoolValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php - AnyValue::hasBytesValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php - AnyValue::hasDoubleValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php - AnyValue::hasIntValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php, line 207
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 hasOneof($number) {
$field = $this->desc
->getFieldByNumber($number);
$oneof = $this->desc
->getOneofDecl()[$field->getOneofIndex()];
$oneof_name = $oneof->getName();
$oneof_field = $this->{$oneof_name};
return $number === $oneof_field->getNumber();
}