class PhpIniResolver
@internal @psalm-suppress TypeDoesNotContainType
Hierarchy
- class \OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver implements \OpenTelemetry\SDK\Common\Configuration\Resolver\ResolverInterface
Expanded class hierarchy of PhpIniResolver
File
-
vendor/
open-telemetry/ sdk/ Common/ Configuration/ Resolver/ PhpIniResolver.php, line 13
Namespace
OpenTelemetry\SDK\Common\Configuration\ResolverView source
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);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
PhpIniResolver::hasVariable | public | function | Overrides ResolverInterface::hasVariable | |
PhpIniResolver::retrieveValue | public | function | Overrides ResolverInterface::retrieveValue | |
PhpIniResolver::__construct | public | function |