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

Breadcrumb

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

function ProtobufSerializer::hydrate

@phan-suppress PhanParamTooManyInternal (

Throws

Exception

See also

https://github.com/phan/phan/pull/4840)

File

vendor/open-telemetry/exporter-otlp/ProtobufSerializer.php, line 85

Class

ProtobufSerializer
@internal @psalm-type SUPPORTED_CONTENT_TYPES = ContentTypes::PROTOBUF|ContentTypes::JSON|ContentTypes::NDJSON

Namespace

OpenTelemetry\Contrib\Otlp

Code

public function hydrate(Message $message, string $payload) : void {
    // @phpstan-ignore-next-line
    match ($this->contentType) {    ContentTypes::PROTOBUF => $message->mergeFromString($payload),
        ContentTypes::JSON, ContentTypes::NDJSON => $message->mergeFromJsonString($payload, true),
    
    };
}

API Navigation

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