Files
oai-symfony/src/OAI/Verb/Identify.php
2026-05-07 20:31:04 +02:00

34 lines
688 B
PHP

<?php
declare(strict_types=1);
namespace OaiSymfony\OAI\Verb;
use OaiSymfony\OAI\OaiIdentify;
use OaiSymfony\OAI\OaiBase;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* Identify data for the repository
*/
final class Identify
{
public readonly OaiIdentify $identify;
public function __construct(
private readonly ?ParameterBagInterface $params
)
{
$this->identify = new OaiIdentify($this->params);
}
/**
* Returns the XML response
*/
public function response(): string
{
$xml = $this->identify->toXML();
return OaiBase::create($this->params, $xml, 'Identify');
}
}