60 : self
61 {
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]);
67 $dic[FilenameSanitizer::class] =
static fn(
$c): FilenameSanitizer
68 => new DefaultFilenameSanitizer(
69 $DIC->fileServiceSettings()
70 );
71
72 $dic[PublicInterface::class] =
static fn(
$c): PublicInterface
73 => new DefaultPublicInterface(
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],
93 );
94
95 $dic[ConfigurationRepository::class] =
static fn(
$c): ConfigurationRepository
96 => new ConfigurationRepository(
98 $DIC[
'user']->getSettings()->getSettingByDefinitionClass(
99 CreateMode::class
100 ),
102 );
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]
108 );
109 $dic[AnswerFormGenericTableDefinitions::class] =
static fn(
$c): AnswerFormGenericTableDefinitions
110 => new AnswerFormGenericTableDefinitions(
111 $c[PersistenceFactory::class]
112 );
113 $dic[DatabaseStatementBuilder::class] =
static fn(
$c): DatabaseStatementBuilder
114 => new DatabaseStatementBuilder(
115 $c[PersistenceFactory::class],
116 $c[QuestionTableDefinitions::class],
117 $c[AnswerFormGenericTableDefinitions::class]
118 );
119 $dic[AttemptTableDefinitions::class] =
static fn(
$c): AttemptTableDefinitions
120 => new AttemptTableDefinitions(
121 $c[PersistenceFactory::class]
122 );
123 $dic[AttemptRepository::class] =
static fn(
$c): AttemptRepository
124 => new AttemptRepository(
127 $c[UuidFactory::class],
128 $c[PersistenceFactory::class],
129 $c[AttemptTableDefinitions::class]
130 );
134 $c[DataFactory::class]->text(),
138 $c[UuidFactory::class],
139 $c[DataFactory::class]->text(),
140 $c[PersistenceFactory::class],
142 $c[PersistenceFactory::class]
143 )
144 )
145 ),
151 $DIC[
'user']->getLoggedInUser(),
155 $DIC[
'resource_storage'],
156 $c[PersistenceFactory::class],
158 $c[PersistenceFactory::class]
159 )
160 )
161 ),
162 new
Capabilities\MarkingAllowingPartialPoints\Capability(),
165 ]);
166 $dic[AnswerFormFactory::class] =
static fn(
$c): AnswerFormFactory
167 => new AnswerFormFactory(
168 $c[UuidFactory::class],
169 [
170 $c[Cloze\Definition::class]
171 ]
172 );
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]
183 );
184 $dic[LayoutFactory::class] =
static fn(
$c): LayoutFactory =>
185 new LayoutFactory(
189 $DIC[
'resource_storage'],
190 $DIC[
'filesystem']->temp(),
192 $c[FilenameSanitizer::class]
193 );
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()
199 );
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],
204 );
205 $dic[Cloze\Properties\Gaps\Factory::class] =
static fn(
$c): Cloze\Properties\Gaps\Factory
206 => new Cloze\Properties\Gaps\Factory(
208 $c[UuidFactory::class],
209 $c[Cloze\Properties\Gaps\AnswerOptions\Factory::class],
210 [
211 new Cloze\Properties\Gaps\Text(
214 ),
215 new Cloze\Properties\Gaps\Numeric(
218 ),
219 new Cloze\Properties\Gaps\Select(
222 ),
223 new Cloze\Properties\Gaps\LongMenu(
227 )
228 ]
229 );
230 $dic[Cloze\TableDefinitions::class] =
static fn(
$c): Cloze\TableDefinitions
231 => new Cloze\TableDefinitions(
232 $c[PersistenceFactory::class],
233 new TableSubNameSpace(
234 'ILIAS',
235 'cloze'
236 )
237 );
238 $dic[Cloze\Properties\Factory::class] =
static fn(
$c): Cloze\Properties\Factory
239 => new Cloze\Properties\Factory(
240 $c[PersistenceFactory::class],
241 $c[Cloze\Properties\ClozeText\Factory::class],
242 $c[Cloze\Properties\Gaps\Factory::class],
243 $c[Cloze\Properties\Combinations\Factory::class]
244 );
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]
249 );
250 $dic[Cloze\Properties\Gaps\Edit::class] =
static fn(
$c): Cloze\Properties\Gaps\Edit
251 => new Cloze\Properties\Gaps\Edit(
253 $c[Cloze\Properties\Factory::class],
254 $c[Cloze\Properties\Gaps\Factory::class]
255 );
256 $dic[Cloze\Views\Edit::class] =
static fn(
$c): Cloze\Views\Edit
257 => new Cloze\Views\Edit(
258 $c[Cloze\Properties\Factory::class],
259 $c[Cloze\Properties\ClozeText\Factory::class],
260 $c[Cloze\Properties\Gaps\Edit::class]
261 );
262 $dic[Cloze\Definition::class] =
static fn(
$c): Cloze\Definition => new Cloze\Definition(
263 $c[Cloze\TableDefinitions::class],
264 [
266 $c[UuidFactory::class],
267 $c[DataFactory::class]->text()
268 ),
270 $c[Cloze\Properties\Factory::class],
271 $c[Cloze\Response\Factory::class]
272 ),
274 $c[MustacheEngine::class],
275 $c[Cloze\Response\Factory::class]
276 ),
279 $c[MustacheEngine::class],
280 $c[Cloze\Response\Factory::class]
281 )
282 ],
283 $c[Cloze\Properties\Factory::class],
284 $c[Cloze\Response\Factory::class],
285 $c[Cloze\Views\Edit::class]
286 );
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]
292 );
293
295 }
@ SuggestedLearningContent