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

Breadcrumb

  1. Drupal Core 11.1.x

Composite.php

Same filename in this branch
  1. 11.1.x vendor/symfony/validator/Constraints/Composite.php

Namespace

OpenTelemetry\SDK\Resource\Detectors

File

vendor/open-telemetry/sdk/Resource/Detectors/Composite.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\SDK\Resource\Detectors;

use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
use OpenTelemetry\SDK\Resource\ResourceInfo;
use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
final class Composite implements ResourceDetectorInterface {
    
    /**
     * @param iterable<ResourceDetectorInterface> $resourceDetectors
     */
    public function __construct(iterable $resourceDetectors) {
    }
    public function getResource() : ResourceInfo {
        $resource = ResourceInfoFactory::emptyResource();
        foreach ($this->resourceDetectors as $resourceDetector) {
            $resource = $resource->merge($resourceDetector->getResource());
        }
        return $resource;
    }

}

Classes

Title Deprecated Summary
Composite

API Navigation

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