ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 }
Readable part of repository interface to ilComponentDataDB.
Writeable part of repository interface to ilComponentDataDB.
Implementation of ilPluginStateDB over ilDBInterface.
Interface Observer Contains several chained tasks and infos about them.
init(\ILIAS\DI\Container $c)
$c
Definition: deliver.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class HTTPServicesTest.
Repository interface for plugin state data.
initInternal(\ILIAS\DI\Container $c)
Repository for component data implemented over artifacts.