19declare(strict_types=1);
44use Mustache\Engine as MustacheEngine;
45use Pimple\Container as PimpleContainer;
49 protected static ?
self $dic =
null;
51 public static function dic(): self
63 $dic[DataFactory::class] =
static fn(
$c): DataFactory =>
new DataFactory();
64 $dic[UuidFactory::class] =
static fn(
$c): UuidFactory =>
new UuidFactory();
65 $dic[MustacheEngine::class] =
static fn(
$c): MustacheEngine
66 =>
new MustacheEngine([
'escape' =>
static fn($v) => $v]);
69 $DIC->fileServiceSettings()
75 $DIC[
'user']->getLoggedInUser(),
79 $DIC[
'global_screen'],
86 $c[UuidFactory::class],
87 $c[ConfigurationRepository::class],
88 $c[AnswerFormFactory::class],
89 $c[QuestionsRepository::class],
90 $c[AttemptRepository::class],
91 $c[LayoutFactory::class],
98 $DIC[
'user']->getSettings()->getSettingByDefinitionClass(
103 $dic[PersistenceFactory::class] =
static fn(
$c): PersistenceFactory
104 =>
new PersistenceFactory();
105 $dic[QuestionTableDefinitions::class] =
static fn(
$c): QuestionTableDefinitions
106 =>
new QuestionTableDefinitions(
107 $c[PersistenceFactory::class]
111 $c[PersistenceFactory::class]
115 $c[PersistenceFactory::class],
116 $c[QuestionTableDefinitions::class],
117 $c[AnswerFormGenericTableDefinitions::class]
119 $dic[AttemptTableDefinitions::class] =
static fn(
$c): AttemptTableDefinitions
120 =>
new AttemptTableDefinitions(
121 $c[PersistenceFactory::class]
123 $dic[AttemptRepository::class] =
static fn(
$c): AttemptRepository
124 =>
new AttemptRepository(
127 $c[UuidFactory::class],
128 $c[PersistenceFactory::class],
129 $c[AttemptTableDefinitions::class]
131 $dic[Capabilities\Factory::class] =
static fn(
$c): Capabilities\Factory
132 =>
new Capabilities\Factory([
134 $c[DataFactory::class]->text(),
138 $c[UuidFactory::class],
139 $c[DataFactory::class]->text(),
140 $c[PersistenceFactory::class],
142 $c[PersistenceFactory::class]
151 $DIC[
'user']->getLoggedInUser(),
155 $DIC[
'resource_storage'],
156 $c[PersistenceFactory::class],
158 $c[PersistenceFactory::class]
166 $dic[AnswerFormFactory::class] =
static fn(
$c): AnswerFormFactory
167 =>
new AnswerFormFactory(
168 $c[UuidFactory::class],
170 $c[Cloze\Definition::class]
173 $dic[QuestionsRepository::class] =
static fn(
$c): QuestionsRepository
174 =>
new QuestionsRepository(
177 $c[UuidFactory::class],
178 $c[DatabaseStatementBuilder::class],
179 $c[PersistenceFactory::class],
180 $c[QuestionTableDefinitions::class],
181 $c[AnswerFormGenericTableDefinitions::class],
182 $c[AnswerFormFactory::class]
184 $dic[LayoutFactory::class] =
static fn(
$c): LayoutFactory =>
189 $DIC[
'resource_storage'],
190 $DIC[
'filesystem']->temp(),
192 $c[FilenameSanitizer::class]
194 $dic[Cloze\Properties\ClozeText\Factory::class] =
static fn(
$c): Cloze\Properties\ClozeText\Factory
195 =>
new Cloze\Properties\ClozeText\Factory(
197 $c[MustacheEngine::class],
198 $c[DataFactory::class]->text()
200 $dic[Cloze\Properties\Gaps\AnswerOptions\Factory::class] =
static fn(
$c): Cloze\Properties\Gaps\AnswerOptions\Factory
201 =>
new Cloze\Properties\Gaps\AnswerOptions\Factory(
202 $c[UuidFactory::class],
205 $dic[Cloze\Properties\Gaps\Factory::class] =
static fn(
$c): Cloze\Properties\Gaps\Factory
206 =>
new Cloze\Properties\Gaps\Factory(
208 $c[UuidFactory::class],
230 $dic[Cloze\TableDefinitions::class] =
static fn(
$c): Cloze\TableDefinitions
231 =>
new Cloze\TableDefinitions(
232 $c[PersistenceFactory::class],
238 $dic[Cloze\Properties\Factory::class] =
static fn(
$c): Cloze\Properties\Factory
239 =>
new Cloze\Properties\Factory(
240 $c[PersistenceFactory::class],
245 $dic[Cloze\Response\Factory::class] =
static fn(
$c): Cloze\Response\Factory
246 =>
new Cloze\Response\Factory(
247 $c[UuidFactory::class],
248 $c[PersistenceFactory::class]
250 $dic[Cloze\Properties\Gaps\Edit::class] =
static fn(
$c): Cloze\Properties\Gaps\Edit
251 =>
new Cloze\Properties\Gaps\Edit(
256 $dic[Cloze\Views\Edit::class] =
static fn(
$c): Cloze\Views\Edit
257 =>
new Cloze\Views\Edit(
262 $dic[Cloze\Definition::class] =
static fn(
$c): Cloze\Definition =>
new Cloze\Definition(
263 $c[Cloze\TableDefinitions::class],
266 $c[UuidFactory::class],
267 $c[DataFactory::class]->text()
271 $c[Cloze\Response\Factory::class]
274 $c[MustacheEngine::class],
275 $c[Cloze\Response\Factory::class]
279 $c[MustacheEngine::class],
280 $c[Cloze\Response\Factory::class]
284 $c[Cloze\Response\Factory::class],
285 $c[Cloze\Views\Edit::class]
287 $dic[Cloze\Properties\Combinations\Factory::class] =
static fn(
$c): Cloze\Properties\Combinations\Factory
288 =>
new Cloze\Properties\Combinations\Factory(
289 $c[UuidFactory::class],
290 $c[PersistenceFactory::class],
291 $c[Cloze\TableDefinitions::class]
Customizing of pimple-DIC for ILIAS.
Standard implementation of the filename sanitizing interface.
static buildDIC(ILIASContainer $DIC)
The filename sanitizer verifies and fixes file name endings.
@ SuggestedLearningContent