Processing of the verb Identify
This commit is contained in:
@@ -6,6 +6,7 @@ namespace OaiSymfony\OAI\Verb;
|
||||
|
||||
use OaiSymfony\OAI\OaiIdentify;
|
||||
use OaiSymfony\OAI\OaiBase;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
|
||||
/**
|
||||
* Identify data for the repository
|
||||
@@ -14,16 +15,19 @@ final class Identify
|
||||
{
|
||||
public readonly OaiIdentify $identify;
|
||||
|
||||
public function __construct()
|
||||
public function __construct(
|
||||
private readonly ?ParameterBagInterface $params
|
||||
)
|
||||
{
|
||||
$this->identify = new OaiIdentify;
|
||||
$this->identify = new OaiIdentify($this->params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the XML response
|
||||
*/
|
||||
public function response(): string
|
||||
{
|
||||
$xml = $this->identify->toXML();
|
||||
return OaiBase::create($xml, 'Identify');
|
||||
$xml = $this->identify->toXML();
|
||||
return OaiBase::create($this->params, $xml, 'Identify');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user