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

Breadcrumb

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

function ConfigurationResolver::getInt

Overrides ConfigurationResolverInterface::getInt

File

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

Class

ConfigurationResolver

Namespace

OpenTelemetry\API\Instrumentation

Code

public function getInt(string $name) : ?int {
    $value = $this->getVariable($name);
    if ($value === null) {
        return null;
    }
    if (filter_var($value, FILTER_VALIDATE_INT) === false) {
        
        //log warning
        return null;
    }
    return (int) $value;
}
RSS feed
Powered by Drupal