summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/api/Baggage/Metadata.php
blob: 043c96a8a9b11e5c4cf95b10c2d9f12553e11b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
    }
}