Class InitCtrlService wraps the initialization of ilCtrl.
More...
Class InitCtrlService wraps the initialization of ilCtrl.
- Author
- Thibeau Fuhrer thf@s.nosp@m.tude.nosp@m.r-rai.nosp@m.mann.nosp@m..ch This class exists because due to dependency-injection the initialization of ilCtrl got a little more complicated - and is used on several occasions.
Definition at line 31 of file InitCtrlService.php.
◆ abortIfMissingDependencies()
InitCtrlService::abortIfMissingDependencies |
( |
Container |
$dic | ) |
|
|
private |
Aborts if another dependency required by the ctrl service is not yet available.
- Parameters
-
- Exceptions
-
Definition at line 92 of file InitCtrlService.php.
92 : void
93 {
94 if (!
$dic->offsetExists(
'http')) {
95 throw new ilCtrlException(
"Cannot initialize ilCtrl if HTTP Services are not yet available.");
96 }
97
98 if (!
$dic->offsetExists(
'refinery')) {
99 throw new ilCtrlException(
"Cannot initialize ilCtrl if Refinery Factory is not yet available.");
100 }
101
102
103
104
105 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
References $dic.
Referenced by init().
◆ init()
Initializes the ilCtrl service.
This method EXPECTS that $GLOBALS['DIC'] is already initialized with the http services and the refinery factory.
- Parameters
-
- Exceptions
-
Definition at line 40 of file InitCtrlService.php.
40 : void
41 {
43
44 try {
49 );
50 } catch (Throwable $t) {
51 throw new ilCtrlException(self::class .
" could not require artifacts, try `composer du` first.");
52 }
53
57 $path_factory,
58 $dic->http()->wrapper()->query(),
60 );
61
62
64 $ctrl_structure,
65 $token_repository,
66 $path_factory,
68 $dic[
"http.response_sender_strategy"],
69 $dic->http()->request(),
70 $dic->http()->wrapper()->post(),
71 $dic->http()->wrapper()->query(),
73 $dic[
"component.factory"],
76 );
77
78
79
80 $dic[
'ilCtrl'] =
static function () {
82 };
83 }
abortIfMissingDependencies(Container $dic)
Aborts if another dependency required by the ctrl service is not yet available.
Class ilCtrlContext is responsible for holding the current context information.
Class ilCtrlStructure holds the currently read control structure.
Class ilCtrlTokenRepository.
Class ilCtrl provides processing control methods.
References $context, $dic, $GLOBALS, abortIfMissingDependencies(), and ILIAS\Setup\Artifact\BuildArtifactObjective\PATH().
The documentation for this class was generated from the following file: