ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
Init.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\StaticURL;
22
30
34final class Init
35{
36 public static function init(Container $c): void
37 {
38 $c['static_url.request_builder'] = (static fn(Container $c): RequestBuilder => new BundledRequestBuilder());
39
40 $c['static_url.context'] = (static fn(Container $c): Context => new Context($c));
41
42 $c['static_url.handler'] = static function (Container $c): HandlerService {
43 $handlers = (require ArtifactObjective::PATH() ?? []);
44 $handlers = array_map(static fn(string $handler): Handler => new $handler(), $handlers);
45
46 return new HandlerService(
47 $c['static_url.request_builder'],
48 $c['static_url.context'],
49 $handlers
50 );
51 };
52
53 $c['static_url.config'] = static fn(): Configuration => new StaticURLConfig();
54
55 $c['static_url.uri_builder'] = (static fn(Container $c): URIBuilder => new StandardURIBuilder(
56 $c['static_url.config']
57 ));
58
59 $c['static_url'] = (static fn(Container $c): Services => new Services(
60 $c['static_url.handler'],
61 $c['static_url.uri_builder'],
62 $c['static_url.context']
63 ));
64 }
65
66}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class Services.
Definition: Services.php:38
static init(Container $c)
Definition: Init.php:36
$c
Definition: deliver.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$handler
Definition: oai.php:29