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

Breadcrumb

  1. Drupal Core 11.1.x

PhpIniResolver.php

Namespace

OpenTelemetry\SDK\Common\Configuration\Resolver

File

vendor/open-telemetry/sdk/Common/Configuration/Resolver/PhpIniResolver.php

View source
<?php

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

use OpenTelemetry\SDK\Common\Configuration\Configuration;

/**
 * @internal
 * @psalm-suppress TypeDoesNotContainType
 */
class PhpIniResolver implements ResolverInterface {
    public function __construct(PhpIniAccessor $accessor = new PhpIniAccessor()) {
    }
    public function retrieveValue(string $variableName) {
        $value = $this->accessor
            ->get($variableName) ?: '';
        if (is_array($value)) {
            return implode(',', $value);
        }
        return $value;
    }
    public function hasVariable(string $variableName) : bool {
        $value = $this->accessor
            ->get($variableName);
        if ($value === []) {
            return false;
        }
        return $value !== false && !Configuration::isEmpty($value);
    }

}

Classes

Title Deprecated Summary
PhpIniResolver @internal @psalm-suppress TypeDoesNotContainType

API Navigation

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