OpenTelemetry PHP

ArrayAccessGetterSetter
in package
implements PropagationGetterInterface, PropagationSetterInterface

FinalYes
Tags
see
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#textmap-propagator

Getter and Setter.

Default implementation of PropagationGetterInterface and PropagationSetterInterface. This type is used if no custom getter/setter is provided to TextMapPropagatorInterface::inject() or TextMapPropagatorInterface::extract().

Table of Contents

Interfaces

PropagationGetterInterface
PropagationSetterInterface

Properties

$instance  : self|null

Methods

get()  : string|null
Gets the value of a given key from a carrier.
getInstance()  : self
Returns a singleton instance of `self` to avoid, multiple runtime allocations.
keys()  : array<int, string>
Returns the list of all the keys in the carrier.
set()  : void
Set the value for a given key on the associated carrier.
isSupportedCarrier()  : bool
resolveKey()  : string

Properties

Methods

get()

Gets the value of a given key from a carrier.

public get(mixed $carrier, string $key) : string|null
Parameters
$carrier : mixed
$key : string
Return values
string|null

getInstance()

Returns a singleton instance of `self` to avoid, multiple runtime allocations.

public static getInstance() : self
Return values
self

keys()

Returns the list of all the keys in the carrier.

public keys(mixed $carrier) : array<int, string>
Parameters
$carrier : mixed
Return values
array<int, string>

set()

Set the value for a given key on the associated carrier.

public set(mixed &$carrier, string $key, string $value) : void
Parameters
$carrier : mixed
$key : string
$value : string

isSupportedCarrier()

private isSupportedCarrier(mixed $carrier) : bool
Parameters
$carrier : mixed
Return values
bool

resolveKey()

private resolveKey(mixed $carrier, string $key) : string
Parameters
$carrier : mixed
$key : string
Return values
string

        
On this page

Search results