ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Initiator.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\DI\Container as GlobalContainer;
30use ILIAS\Export\ExportHandler\Factory as ExportService;
31use ILIAS\Data\Factory as DataFactory;
33
35{
37
38 public function __construct(
39 GlobalContainer $dic
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}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Builds data types.
Definition: Factory.php:36
__construct(GlobalContainer $dic)
Definition: Initiator.php:38
$dic
Definition: ltiresult.php:33