ILIAS  trunk Revision v12.0_alpha-1338-g8f7e531aa3c
Init.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\StaticURL;
22
32
36final class Init
37{
38 public static function init(Container $c): void
39 {
40 $c['static_url.request_builder'] = (static fn(Container $c): RequestBuilder => new BundledRequestBuilder());
41
42 $c['static_url.context'] = (static fn(Container $c): Context => new Context($c));
43
44 $c['static_url.session_store'] = (static fn(Container $c): SessionStore => new ILIASSessionStore());
45
46 $c['static_url.handler'] = static function (Container $c): HandlerService {
47 $handlers = (require ArtifactObjective::PATH() ?? []);
48 $handlers = array_map(static fn(string $handler): Handler => new $handler(), $handlers);
49
50 return new HandlerService(
51 $c['static_url.request_builder'],
52 $c['static_url.context'],
53 $handlers,
54 $c['static_url.session_store']
55 );
56 };
57
58 $c['static_url.config'] = static fn(): Configuration => new StaticURLConfig();
59
60 $c['static_url.uri_builder'] = (static fn(Container $c): URIBuilder => new StandardURIBuilder(
61 $c['static_url.config']
62 ));
63
64 $c['static_url'] = (static fn(Container $c): Services => new Services(
65 $c['static_url.handler'],
66 $c['static_url.uri_builder'],
67 $c['static_url.context']
68 ));
69 }
70
71}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class Services.
Definition: Services.php:38
static init(Container $c)
Definition: Init.php:38
$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:31