You are here

CompositeIdentifierProvider.php in Persistent URL 8

File

src/Plugin/Purl/Identifier/CompositeIdentifierProvider.php
View source
<?php

namespace Drupal\purl\Plugin\Purl\Identifier;

class CompositeIdentifierProvider implements IdentifierProviderInterface {

  /**
   * @var array|IdentifierProviderInterface[]
   */
  protected $providers;
  public function __construct(array $providers) {
    $this->providers = $providers;
  }
  public function getIdentifiers() {
    $identifiers = array();
    foreach ($this->providers as $provider) {
      $identifiers = array_merge($identifiers, $provider
        ->getIdentifiers());
    }
    return $identifiers;
  }

}

Classes