ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
Initiator.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
30 use ILIAS\Export\ExportHandler\Factory as ExportService;
33 
34 class Initiator
35 {
37 
38  public function __construct(
40  ) {
41  $this->services = new InternalServices($dic);
42  }
43 
44  public function harvester(): Harvester
45  {
46  /*
47  * This should be replaced by a proper export API
48  * when it is available.
49  */
50  $export_service = new ExportService();
51 
52  return new Harvester(
53  $this->services->OERHarvester()->settings(),
54  new ObjectHandler($this->services->dic()->repositoryTree()),
55  new ExportHandler(
56  $this->services->dic()->user(),
57  $export_service,
58  new DataFactory()
59  ),
60  $this->services->OERHarvester()->statusRepository(),
61  new DatabaseRepository($this->services->dic()->database()),
62  $this->services->copyright()->searcherFactory(),
63  $this->services->repository()->repository(),
64  new Writer(
65  $this->services->repository()->repository(),
66  $this->services->xml()->simpleDCWriter()
67  ),
68  $this->services->dic()->logger()->meta()
69  );
70  }
71 
72  public function settings(): SettingsInterface
73  {
74  return $this->services->OERHarvester()->settings();
75  }
76 
78  {
79  return $this->services->copyright()->repository();
80  }
81 }
__construct(GlobalContainer $dic)
Definition: Initiator.php:38
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$dic
Definition: result.php:31