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

Breadcrumb

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

function FiberBoundContextStorage::scope

Overrides ContextStorageInterface::scope

File

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

Class

FiberBoundContextStorage
@internal

Namespace

OpenTelemetry\Context

Code

public function scope() : ?ContextStorageScopeInterface {
    $head = $this->heads[Fiber::getCurrent() ?? $this] ?? null;
    if (!$head?->node && Fiber::getCurrent()) {
        self::triggerNotInitializedFiberContextWarning();
        return null;
    }
    // Starts with empty head instead of cloned parent -> no need to check for head mismatch
    return $head->node;
}

API Navigation

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