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

Breadcrumb

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

function ConfigurationResolver::getVariable

5 calls to ConfigurationResolver::getVariable()
ConfigurationResolver::getBoolean in vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
ConfigurationResolver::getInt in vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
ConfigurationResolver::getList in vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
ConfigurationResolver::getString in vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php
ConfigurationResolver::has in vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php

File

vendor/open-telemetry/api/Instrumentation/ConfigurationResolver.php, line 53

Class

ConfigurationResolver

Namespace

OpenTelemetry\API\Instrumentation

Code

private function getVariable(string $name) : ?string {
    $value = $_SERVER[$name] ?? null;
    if ($value !== false && !self::isEmpty($value)) {
        assert(is_string($value));
        return $value;
    }
    $value = getenv($name);
    if ($value !== false && !self::isEmpty($value)) {
        return $value;
    }
    $value = ini_get($name);
    if ($value !== false && !self::isEmpty($value)) {
        return $value;
    }
    return null;
}
RSS feed
Powered by Drupal