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

Breadcrumb

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

interface ImplicitContextKeyedInterface

Represents a value that can be stored within {Allows storing themselves without exposing a {

Hierarchy

  • interface \OpenTelemetry\Context\ImplicitContextKeyedInterface

Expanded class hierarchy of ImplicitContextKeyedInterface

All classes that implement ImplicitContextKeyedInterface

See also

ContextInterface}.

ContextKeyInterface}.

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6…

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6…

3 files declare their use of ImplicitContextKeyedInterface
BaggageInterface.php in vendor/open-telemetry/api/Baggage/BaggageInterface.php
Configurator.php in vendor/open-telemetry/api/Instrumentation/Configurator.php
SpanInterface.php in vendor/open-telemetry/api/Trace/SpanInterface.php

File

vendor/open-telemetry/context/ImplicitContextKeyedInterface.php, line 14

Namespace

OpenTelemetry\Context
View source
interface ImplicitContextKeyedInterface {
    
    /**
     * Adds `$this` to the {@see Context::getCurrent() current context} and makes
     * the new {@see Context} the current context.
     *
     * {@see ScopeInterface::detach()} _MUST_ be called to properly restore the previous context.
     *
     * This method is equivalent to `Context::getCurrent().with($value).activate();`.
     *
     * @todo: Update this to suggest using the new helper method way to doing something in a specific context/span.
     */
    public function activate() : ScopeInterface;
    
    /**
     * Returns a new {@see ContextInterface} created by setting `$this` into the provided [@see ContextInterface}.
     */
    public function storeInContext(ContextInterface $context) : ContextInterface;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ImplicitContextKeyedInterface::activate public function Adds `$this` to the {the new {
{
This method is equivalent to `Context::getCurrent().with($value).activate();`.
3
ImplicitContextKeyedInterface::storeInContext public function Returns a new { 3

API Navigation

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