Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Message.php

function Message::writeOneof

28 calls to Message::writeOneof()
AnyValue::setArrayValue in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Generated from protobuf field <code>.opentelemetry.proto.common.v1.ArrayValue array_value = 5;</code>
AnyValue::setBoolValue in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Generated from protobuf field <code>bool bool_value = 2;</code>
AnyValue::setBytesValue in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Generated from protobuf field <code>bytes bytes_value = 7;</code>
AnyValue::setDoubleValue in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Generated from protobuf field <code>double double_value = 4;</code>
AnyValue::setIntValue in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Generated from protobuf field <code>int64 int_value = 3;</code>

... See full list

File

vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php, line 216

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\Internal

Code

protected function writeOneof($number, $value) {
    $field = $this->desc
        ->getFieldByNumber($number);
    $oneof = $this->desc
        ->getOneofDecl()[$field->getOneofIndex()];
    $oneof_name = $oneof->getName();
    if ($value === null) {
        $this->{$oneof_name} = new OneofField($oneof);
    }
    else {
        $oneof_field = $this->{$oneof_name};
        $oneof_field->setValue($value);
        $oneof_field->setFieldName($field->getName());
        $oneof_field->setNumber($number);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal