ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
InitComponentService.php
Go to the documentation of this file.
1<?php
2
23{
24 public function init(\ILIAS\DI\Container $c): void
25 {
26 $int = $this->initInternal($c);
27
28 $c["component.repository"] = fn($c): \ilComponentRepository => $int["db_write"];
29
30 $c["component.factory"] = fn($c): \ilComponentFactory => new ilComponentFactoryImplementation(
31 $int["db_write"],
32 $c["ilDB"]
33 );
34 }
35
36 public function initInternal(\ILIAS\DI\Container $c): \Pimple\Container
37 {
38 $int = new \Pimple\Container();
39 $data_factory = new \ILIAS\Data\Factory();
40
41 $int["plugin_state_db"] = fn($int): \ilPluginStateDB => new ilPluginStateDBOverIlDBInterface(
42 $data_factory,
43 $c["ilDB"]
44 );
45
46 $int["db_write"] = fn($int): \ilComponentRepositoryWrite => new ilArtifactComponentRepository(
47 $data_factory,
48 $int["plugin_state_db"],
49 $c["ilias.version"]
50 );
51
52 return $int;
53 }
54}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
init(\ILIAS\DI\Container $c)
initInternal(\ILIAS\DI\Container $c)
Repository for component data implemented over artifacts.
Implementation of ilPluginStateDB over ilDBInterface.
$c
Definition: deliver.php:25
Writeable part of repository interface to ilComponentDataDB.
Readable part of repository interface to ilComponentDataDB.
Repository interface for plugin state data.
Class HTTPServicesTest.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.