ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Initiator.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
34 
35 class Initiator implements InitiatorInterface
36 {
37  protected Container $dic;
38 
40  protected RequestParserInterface $request_parser;
42 
43  public function __construct(Container $dic)
44  {
45  $this->dic = $dic;
46  }
47 
48  public function httpWrapper(): HTTPWrapperInterface
49  {
50  if (isset($this->http_wrapper)) {
51  return $this->http_wrapper;
52  }
53 
54  return $this->http_wrapper = new HTTPWrapper(
55  $this->dic->http(),
56  $this->dic->refinery()
57  );
58  }
59 
60  public function settings(): SettingsInterface
61  {
62  return \ilMDSettings::_getInstance();
63  }
64 
65  public function requestParser(): RequestParserInterface
66  {
67  if (isset($this->request_parser)) {
68  return $this->request_parser;
69  }
70 
71  return $this->request_parser = new RequestParser($this->httpWrapper());
72  }
73 
75  {
76  if (isset($this->request_processor)) {
78  }
79 
80  return $this->request_processor = new RequestProcessor(
81  new Writer(),
82  $this->settings(),
83  new ExposedRecordsRepository($this->dic->database()),
84  new TokenHandler()
85  );
86  }
87 }
RequestProcessorInterface $request_processor
Definition: Initiator.php:41
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
The OAI PMH interface does not use the usual internal services of the MetaData component, as it should be lightweight and decoupled from everything else as much as possible.
RequestParserInterface $request_parser
Definition: Initiator.php:40
Processes OAI PMH requests according to https://www.openarchives.org/OAI/openarchivesprotocol.html.