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

Breadcrumb

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

class Attributes

Same name in this branch
  1. 11.1.x vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php \Doctrine\Common\Annotations\Annotation\Attributes

@psalm-suppress MissingTemplateParam

Hierarchy

  • class \OpenTelemetry\SDK\Common\Attribute\Attributes implements \OpenTelemetry\SDK\Common\Attribute\AttributesInterface, \IteratorAggregate

Expanded class hierarchy of Attributes

18 files declare their use of Attributes
BucketStorage.php in vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php
Composer.php in vendor/open-telemetry/sdk/Resource/Detectors/Composer.php
Environment.php in vendor/open-telemetry/sdk/Resource/Detectors/Environment.php
FilteredAttributeProcessor.php in vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php
Host.php in vendor/open-telemetry/sdk/Resource/Detectors/Host.php

... See full list

22 string references to 'Attributes'
badge.component.yml in core/profiles/demo_umami/themes/umami/components/badge/badge.component.yml
core/profiles/demo_umami/themes/umami/components/badge/badge.component.yml
banner.component.yml in core/profiles/demo_umami/themes/umami/components/banner/banner.component.yml
core/profiles/demo_umami/themes/umami/components/banner/banner.component.yml
branding.component.yml in core/profiles/demo_umami/themes/umami/components/branding/branding.component.yml
core/profiles/demo_umami/themes/umami/components/branding/branding.component.yml
card.component.yml in core/profiles/demo_umami/themes/umami/components/card/card.component.yml
core/profiles/demo_umami/themes/umami/components/card/card.component.yml
claro_preprocess_admin_block_content in core/themes/claro/claro.theme
Implements template_preprocess_HOOK() for admin_block.

... See full list

File

vendor/open-telemetry/sdk/Common/Attribute/Attributes.php, line 14

Namespace

OpenTelemetry\SDK\Common\Attribute
View source
final class Attributes implements AttributesInterface, IteratorAggregate {
    
    /**
     * @internal
     */
    public function __construct(array $attributes, int $droppedAttributesCount) {
    }
    public static function create(iterable $attributes) : AttributesInterface {
        return self::factory()->builder($attributes)
            ->build();
    }
    public static function factory(?int $attributeCountLimit = null, ?int $attributeValueLengthLimit = null) : AttributesFactoryInterface {
        return new AttributesFactory($attributeCountLimit, $attributeValueLengthLimit);
    }
    public function has(string $name) : bool {
        return array_key_exists($name, $this->attributes);
    }
    public function get(string $name) {
        return $this->attributes[$name] ?? null;
    }
    
    /** @psalm-mutation-free */
    public function count() : int {
        return \count($this->attributes);
    }
    public function getIterator() : Traversable {
        foreach ($this->attributes as $key => $value) {
            (yield (string) $key => $value);
        }
    }
    public function toArray() : array {
        return $this->attributes;
    }
    public function getDroppedAttributesCount() : int {
        return $this->droppedAttributesCount;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Attributes::count public function @psalm-mutation-free
Attributes::create public static function
Attributes::factory public static function
Attributes::get public function Overrides AttributesInterface::get
Attributes::getDroppedAttributesCount public function Overrides AttributesInterface::getDroppedAttributesCount
Attributes::getIterator public function
Attributes::has public function Overrides AttributesInterface::has
Attributes::toArray public function Overrides AttributesInterface::toArray
Attributes::__construct public function @internal

API Navigation

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