You are here

public function Repository::identify in Views OAI-PMH 8

File

src/Service/Repository.php, line 70

Class

Repository

Namespace

Drupal\views_oai_pmh\Service

Code

public function identify() {
  $description = new \DOMDocument();
  $oai_identifier = $description
    ->createElement('oai-identifier');
  $oai_identifier
    ->setAttribute('xmlns', 'http://www.openarchives.org/OAI/2.0/oai-identifier');
  $oai_identifier
    ->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
  $oai_identifier
    ->setAttribute('xsi:schemaLocation', 'http://www.openarchives.org/OAI/2.0/oai-identifier http://www.openarchives.org/OAI/2.0/oai-identifier.xsd');
  $description
    ->appendChild($oai_identifier);
  return new Identity($this->siteName, new \DateTime(), 'transient', [
    $this->mail,
  ], $this
    ->getGranularity(), 'deflate', $description);
}