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

Breadcrumb

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

class FileDescriptor

Hierarchy

  • class \Google\Protobuf\Internal\FileDescriptor

Expanded class hierarchy of FileDescriptor

1 file declares its use of FileDescriptor
DescriptorPool.php in vendor/google/protobuf/src/Google/Protobuf/Internal/DescriptorPool.php

File

vendor/google/protobuf/src/Google/Protobuf/Internal/FileDescriptor.php, line 12

Namespace

Google\Protobuf\Internal
View source
class FileDescriptor {
    private $package;
    private $message_type = [];
    private $enum_type = [];
    public function setPackage($package) {
        $this->package = $package;
    }
    public function getPackage() {
        return $this->package;
    }
    public function getMessageType() {
        return $this->message_type;
    }
    public function addMessageType($desc) {
        $this->message_type[] = $desc;
    }
    public function getEnumType() {
        return $this->enum_type;
    }
    public function addEnumType($desc) {
        $this->enum_type[] = $desc;
    }
    public static function buildFromProto($proto) {
        $file = new FileDescriptor();
        $file->setPackage($proto->getPackage());
        foreach ($proto->getMessageType() as $message_proto) {
            $file->addMessageType(Descriptor::buildFromProto($message_proto, $proto, ""));
        }
        foreach ($proto->getEnumType() as $enum_proto) {
            $file->addEnumType(EnumDescriptor::buildFromProto($enum_proto, $proto, ""));
        }
        return $file;
    }

}

Members

Title Sort descending Modifiers Object type Summary
FileDescriptor::$enum_type private property
FileDescriptor::$message_type private property
FileDescriptor::$package private property
FileDescriptor::addEnumType public function
FileDescriptor::addMessageType public function
FileDescriptor::buildFromProto public static function
FileDescriptor::getEnumType public function
FileDescriptor::getMessageType public function
FileDescriptor::getPackage public function
FileDescriptor::setPackage public function

API Navigation

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