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

Breadcrumb

  1. Drupal Core 11.1.x

ConfiguratorClosure.php

Namespace

OpenTelemetry\SDK\Common\InstrumentationScope

File

vendor/open-telemetry/sdk/Common/InstrumentationScope/ConfiguratorClosure.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\SDK\Common\InstrumentationScope;

use Closure;
use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface;

/**
 * @internal
 */
final class ConfiguratorClosure {
    public function __construct(Closure $closure, ?string $name, ?string $version, ?string $schemaUrl) {
    }
    
    /**
     * @psalm-suppress ArgumentTypeCoercion
     */
    public function matches(InstrumentationScopeInterface $instrumentationScope) : bool {
        return ($this->name === null || preg_match($this->name, $instrumentationScope->getName())) && ($this->version === null || $this->version === $instrumentationScope->getVersion()) && ($this->schemaUrl === null || $this->schemaUrl === $instrumentationScope->getSchemaUrl());
    }

}

Classes

Title Deprecated Summary
ConfiguratorClosure @internal
RSS feed
Powered by Drupal