ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
wac.php
Go to the documentation of this file.
1 <?php
9 
11 require_once(__DIR__ . '/../vendor/composer/vendor/autoload.php');
12 
13 $container = new \ILIAS\DI\Container();
14 
15 //manually init http service
16 $container['http.request_factory'] = static fn($c) => new \ILIAS\HTTP\Request\RequestFactoryImpl();
17 
18 $container['http.response_factory'] = static fn($c) => new \ILIAS\HTTP\Response\ResponseFactoryImpl();
19 
20 $container['http.cookie_jar_factory'] = static fn($c) => new \ILIAS\HTTP\Cookies\CookieJarFactoryImpl();
21 
22 $container['http.response_sender_strategy'] = static fn($c) => new \ILIAS\HTTP\Response\Sender\DefaultResponseSenderStrategy();
23 
24 $container['http.duration_factory'] = static fn($c) => new \ILIAS\HTTP\Duration\DurationFactory(
25  new \ILIAS\HTTP\Duration\Increment\IncrementFactory()
26 );
27 
28 $container['http'] = static fn($c) => new \ILIAS\HTTP\Services($c);
29 
31 
36 
37 //TODO: fix tests and mod_xsendfile which refuses to work
39 
40 //send response
41 $Services->sendResponse();
Interface Observer Contains several chained tasks and infos about them.
$c
Definition: deliver.php:9
$container
Definition: wac.php:13
$GLOBALS["DIC"]
Definition: wac.php:30
$Services
Definition: wac.php:35
static run(Services $httpState, CookieFactory $cookieFactory)