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

Breadcrumb

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

function OneofDescriptor::buildFromProto

1 call to OneofDescriptor::buildFromProto()
Descriptor::buildFromProto in vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php

File

vendor/google/protobuf/src/Google/Protobuf/Internal/OneofDescriptor.php, line 51

Class

OneofDescriptor

Namespace

Google\Protobuf\Internal

Code

public static function buildFromProto($oneof_proto, $desc, $index) {
    $oneof = new OneofDescriptor();
    $oneof->setName($oneof_proto->getName());
    foreach ($desc->getField() as $field) {
        
        /** @var FieldDescriptor $field */
        if ($field->getOneofIndex() == $index) {
            $oneof->addField($field);
            $field->setContainingOneof($oneof);
        }
    }
    return $oneof;
}

API Navigation

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