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

Breadcrumb

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

function Message::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/mime/Message.php \Symfony\Component\Mime\Message::__construct()
  2. 11.1.x composer/Plugin/ProjectMessage/Message.php \Drupal\Composer\Plugin\ProjectMessage\Message::__construct()

@ignore

230 calls to Message::__construct()
Annotation::__construct in vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
Constructor.
Annotation::__construct in vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
Constructor.
Any::__construct in vendor/google/protobuf/src/Google/Protobuf/Any.php
Constructor.
Any::__construct in vendor/google/protobuf/src/Google/Protobuf/Any.php
Constructor.
AnyValue::__construct in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Constructor.

... See full list

115 methods override Message::__construct()
Annotation::__construct in vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
Constructor.
Any::__construct in vendor/google/protobuf/src/Google/Protobuf/Any.php
Constructor.
AnyValue::__construct in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/AnyValue.php
Constructor.
Api::__construct in vendor/google/protobuf/src/Google/Protobuf/Api.php
Constructor.
ArrayValue::__construct in vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Common/V1/ArrayValue.php
Constructor.

... See full list

File

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

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

public function __construct($data = NULL) {
    // MapEntry message is shared by all types of map fields, whose
    // descriptors are different from each other. Thus, we cannot find a
    // specific descriptor from the descriptor pool.
    if ($this instanceof MapEntry) {
        $this->initWithDescriptor($data);
    }
    else {
        $this->initWithGeneratedPool();
        if (is_array($data)) {
            $this->mergeFromArray($data);
        }
        else {
            if (!empty($data)) {
                throw new \InvalidArgumentException('Message constructor must be an array or null.');
            }
        }
    }
}

API Navigation

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