41 : void
42 {
43 if (!$this->initiator->settings()->isOAIPMHActive()) {
44 $this->initiator->httpWrapper()->sendResponseAndClose(404);
45 return;
46 }
47
48 set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline): never {
49 throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
50 });
51
52 try {
53 $response = $this->initiator->requestProcessor()->getResponseToRequest(
54 $this->initiator->requestParser()->parseFromHTTP($this->base_url)
55 );
56 }
catch (\Throwable
$e) {
58 $this->initiator->httpWrapper()->sendResponseAndClose(500,
$e->getMessage());
59 return;
60 } finally {
61 restore_error_handler();
62 }
63
64 $this->initiator->httpWrapper()->sendResponseAndClose(200,
'',
$response);
65 }