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

Breadcrumb

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

function AttributesBuilder::normalizeValue

1 call to AttributesBuilder::normalizeValue()
AttributesBuilder::offsetSet in vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php
@phan-suppress PhanUndeclaredClassAttribute

File

vendor/open-telemetry/sdk/Common/Attribute/AttributesBuilder.php, line 97

Class

AttributesBuilder
@internal

Namespace

OpenTelemetry\SDK\Common\Attribute

Code

private function normalizeValue($value) {
    if (is_string($value) && $this->attributeValueLengthLimit !== null) {
        return mb_substr($value, 0, $this->attributeValueLengthLimit);
    }
    if (is_array($value)) {
        foreach ($value as $k => $v) {
            $processed = $this->normalizeValue($v);
            if ($processed !== $v) {
                $value[$k] = $processed;
            }
        }
        return $value;
    }
    return $value;
}

API Navigation

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