19declare(strict_types=1);
39 protected HTTPWrapper $http_wrapper,
40 protected RequestParser $request_parser,
41 protected RequestProcessor $request_processor
43 $this->base_url =
new URI(rtrim(ILIAS_HTTP_PATH,
'/') .
'/oai.php');
48 if (!$this->
settings->isOAIPMHActive()) {
49 $this->http_wrapper->sendResponseAndClose(404);
53 set_error_handler(
static function (
int $errno,
string $errstr,
string $errfile,
int $errline): never {
54 throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
58 $response = $this->request_processor->getResponseToRequest(
59 $this->request_parser->parseFromHTTP($this->base_url)
61 }
catch (Throwable
$e) {
63 $this->http_wrapper->sendResponseAndClose(500,
$e->getMessage());
66 restore_error_handler();
69 $this->http_wrapper->sendResponseAndClose(200,
'',
$response);
72 protected function logError(
string $message): void
74 $this->
logger->error($message);
The scope of this class is split ilias-conform URI's into components.
Component logger with individual log levels by component id.