ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
InitComponentService Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for InitComponentService:

Public Member Functions

 init (\ILIAS\DI\Container $c)
 
 initInternal (\ILIAS\DI\Container $c)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Responsible for loading the Component Service into the dependency injection container of ILIAS

Definition at line 22 of file InitComponentService.php.

Member Function Documentation

◆ init()

InitComponentService::init ( \ILIAS\DI\Container  $c)

Definition at line 24 of file InitComponentService.php.

24 : 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 }
initInternal(\ILIAS\DI\Container $c)
Readable part of repository interface to ilComponentDataDB.

References Vendor\Package\$c, and initInternal().

+ Here is the call graph for this function:

◆ initInternal()

InitComponentService::initInternal ( \ILIAS\DI\Container  $c)

Definition at line 36 of file InitComponentService.php.

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 }
Dependency injection container for the global as well as for local, component specific containers.
Repository for component data implemented over artifacts.
Implementation of ilPluginStateDB over ilDBInterface.
Writeable part of repository interface to ilComponentDataDB.
Repository interface for plugin state data.

References Vendor\Package\$c.

Referenced by init().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: