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

Breadcrumb

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

function Configuration::getBoolean

4 calls to Configuration::getBoolean()
AutoRootSpan::isEnabled in vendor/open-telemetry/sdk/Trace/AutoRootSpan.php
Sdk::isDisabled in vendor/open-telemetry/sdk/Sdk.php
SdkAutoloader::environmentBasedInitializer in vendor/open-telemetry/sdk/SdkAutoloader.php
SdkAutoloader::isEnabled in vendor/open-telemetry/sdk/SdkAutoloader.php
@internal

File

vendor/open-telemetry/sdk/Common/Configuration/Configuration.php, line 53

Class

Configuration
Configuration can come from one or more of the following sources (from highest to lowest priority):

Namespace

OpenTelemetry\SDK\Common\Configuration

Code

public static function getBoolean(string $key, ?bool $default = null) : bool {
    $resolved = self::validateVariableValue(CompositeResolver::instance()->resolve(self::validateVariableType($key, VariableTypes::BOOL), null === $default ? $default : ($default ? 'true' : 'false')));
    try {
        return BooleanParser::parse($resolved);
    } catch (InvalidArgumentException) {
        self::logWarning(sprintf('Invalid boolean value "%s" interpreted as "false" for %s', $resolved, $key));
        return false;
    }
}

API Navigation

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