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

Breadcrumb

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

function AttributeValidator::validate

Validate whether a value is a primitive, or a homogeneous array of primitives (treating int/double as equivalent).

Overrides AttributeValidatorInterface::validate

See also

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.2…

File

vendor/open-telemetry/sdk/Common/Attribute/AttributeValidator.php, line 24

Class

AttributeValidator

Namespace

OpenTelemetry\SDK\Common\Attribute

Code

public function validate($value) : bool {
    if (is_array($value)) {
        return $this->validateArray($value);
    }
    return in_array(gettype($value), self::PRIMITIVES);
}

API Navigation

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