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

Breadcrumb

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

function ArrayAccessGetterSetter::resolveKey

1 call to ArrayAccessGetterSetter::resolveKey()
ArrayAccessGetterSetter::set in vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php
Set the value for a given key on the associated carrier.

File

vendor/open-telemetry/context/Propagation/ArrayAccessGetterSetter.php, line 111

Class

ArrayAccessGetterSetter
Default implementation of {This type is used if no custom getter/setter is provided to {

Namespace

OpenTelemetry\Context\Propagation

Code

private function resolveKey($carrier, string $key) : string {
    if (isset($carrier[$key])) {
        return $key;
    }
    foreach ($carrier as $k => $_) {
        $k = (string) $k;
        if (strcasecmp($k, $key) === 0) {
            return $k;
        }
    }
    return $key;
}

API Navigation

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