19 declare(strict_types=1);
36 $this->
logger = $DIC->logger()->meta();
38 $this->base_url =
new URI(rtrim(ILIAS_HTTP_PATH,
'/') .
'/oai.php');
43 if (!$this->initiator->settings()->isOAIPMHActive()) {
44 $this->initiator->httpWrapper()->sendResponseAndClose(404);
48 set_error_handler(
static function (
int $errno,
string $errstr,
string $errfile,
int $errline): never {
49 throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
53 $response = $this->initiator->requestProcessor()->getResponseToRequest(
54 $this->initiator->requestParser()->parseFromHTTP($this->base_url)
58 $this->initiator->httpWrapper()->sendResponseAndClose(500, $e->getMessage());
61 restore_error_handler();
64 $this->initiator->httpWrapper()->sendResponseAndClose(200,
'',
$response);
69 $this->
logger->error($message);