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

Breadcrumb

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

function Configuration::validateVariableValue

7 calls to Configuration::validateVariableValue()
Configuration::getBoolean in vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
Configuration::getEnum in vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
Configuration::getFloat in vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
Configuration::getInt in vendor/open-telemetry/sdk/Common/Configuration/Configuration.php
Configuration::getMixed in vendor/open-telemetry/sdk/Common/Configuration/Configuration.php

... See full list

File

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

Class

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

Namespace

OpenTelemetry\SDK\Common\Configuration

Code

private static function validateVariableValue($value, ?int $filterType = null) {
    if ($filterType !== null && filter_var($value, $filterType) === false) {
        throw new UnexpectedValueException(sprintf('Value has invalid type "%s"', gettype($value)));
    }
    if ($value === null || $value === '') {
        throw new UnexpectedValueException('Variable must not be null or empty');
    }
    return $value;
}

API Navigation

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