ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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): \ILIAS\DI\ServiceContainer
37 {
38 $int = new \ILIAS\DI\ServiceContainer();
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.
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.