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

Breadcrumb

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

function FiberBoundContextStorage::current

Overrides ContextStorageInterface::current

File

vendor/open-telemetry/context/FiberBoundContextStorage.php, line 48

Class

FiberBoundContextStorage
@internal

Namespace

OpenTelemetry\Context

Code

public function current() : ContextInterface {
    $head = $this->heads[Fiber::getCurrent() ?? $this] ?? null;
    if (!$head?->node && Fiber::getCurrent()) {
        self::triggerNotInitializedFiberContextWarning();
        // Fallback to {main} to preserve BC
        $head = $this->heads[$this];
    }
    return $head->node->context ?? Context::getRoot();
}

API Navigation

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