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

Breadcrumb

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

function DebugScope::detach

Overrides ScopeInterface::detach

File

vendor/open-telemetry/context/DebugScope.php, line 42

Class

DebugScope
@internal

Namespace

OpenTelemetry\Context

Code

public function detach() : int {
    $this->detachedAt ??= debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
    $flags = $this->scope
        ->detach();
    if (($flags & ScopeInterface::DETACHED) !== 0) {
        trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope was already detached %s', spl_object_id($this), self::formatBacktrace($this->detachedAt)));
    }
    elseif (($flags & ScopeInterface::MISMATCH) !== 0) {
        trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached but another scope should have been detached first', spl_object_id($this)));
    }
    elseif (($flags & ScopeInterface::INACTIVE) !== 0) {
        trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached from different execution context', spl_object_id($this)));
    }
    return $flags;
}

API Navigation

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