summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/api/Baggage/Metadata.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/open-telemetry/api/Baggage/Metadata.php')
-rw-r--r--vendor/open-telemetry/api/Baggage/Metadata.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/open-telemetry/api/Baggage/Metadata.php b/vendor/open-telemetry/api/Baggage/Metadata.php
new file mode 100644
index 000000000..043c96a8a
--- /dev/null
+++ b/vendor/open-telemetry/api/Baggage/Metadata.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\API\Baggage;
+
+final class Metadata implements MetadataInterface
+{
+ private static ?self $instance = null;
+
+ public static function getEmpty(): Metadata
+ {
+ return self::$instance ??= new self('');
+ }
+
+ private string $metadata;
+
+ public function __construct(string $metadata)
+ {
+ $this->metadata = $metadata;
+ }
+
+ public function getValue(): string
+ {
+ return $this->metadata;
+ }
+}