ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
InitHttpServices.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\DI\Container
;
20
use
ILIAS\HTTP\Request\RequestFactoryImpl
;
21
use
ILIAS\HTTP\Response\ResponseFactoryImpl
;
22
use
ILIAS\HTTP\Cookies\CookieJarFactoryImpl
;
23
use
ILIAS\HTTP\Response\Sender\DefaultResponseSenderStrategy
;
24
use
ILIAS\HTTP\Duration\DurationFactory
;
25
use
ILIAS\HTTP\Duration\Increment\IncrementFactory
;
26
use
ILIAS\HTTP\Services
;
27
31
class
InitHttpServices
32
{
33
public
function
init
(
Container
$container
): void
34
{
35
$container[
'http.request_factory'
] =
static
function
(
Container
$c
):
RequestFactoryImpl
{
36
$header = null;
37
$value = null;
38
39
if
(
40
isset(
$c
[
'ilIliasIniFile'
])
41
&& (bool)
$c
->iliasIni()->readVariable(
'https'
,
'auto_https_detect_enabled'
)
42
) {
43
$header = (string)
$c
->iliasIni()->readVariable(
'https'
,
'auto_https_detect_header_name'
);
44
$value = (string)
$c
->iliasIni()->readVariable(
'https'
,
'auto_https_detect_header_value'
);
45
$header = $header ===
''
? null : $header;
46
$value = $value ===
''
? null : $value;
47
}
48
49
return
new
RequestFactoryImpl
($header, $value);
50
};
51
52
$container[
'http.response_factory'
] =
static
fn(
$c
):
ResponseFactoryImpl
=>
new
ResponseFactoryImpl
();
53
54
$container[
'http.cookie_jar_factory'
] =
static
fn(
$c
):
CookieJarFactoryImpl
=>
new
CookieJarFactoryImpl
();
55
56
$container[
'http.response_sender_strategy'
] =
static
fn(
57
$c
58
):
DefaultResponseSenderStrategy
=>
new
DefaultResponseSenderStrategy
();
59
60
$container[
'http.duration_factory'
] =
static
fn(
$c
):
DurationFactory
=>
new
DurationFactory
(
61
new
IncrementFactory
()
62
);
63
64
$container[
'http.security'
] =
static
function
(
$c
):
void
{
65
throw
new
OutOfBoundsException
(
'TODO'
);
66
};
67
68
$container[
'http'
] =
static
fn(
$c
):
Services
=>
new
Services
(
$c
);
69
}
70
}
CookieJarFactoryImpl
ILIAS\HTTP\Cookies\CookieJarFactoryImpl
Definition:
CookieJarFactoryImpl.php:31
ILIAS\HTTP\Response\ResponseFactoryImpl
Definition:
ResponseFactoryImpl.php:34
ResponseFactoryImpl
$c
$c
Definition:
deliver.php:9
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
$container
$container
Definition:
wac.php:13
Services
ILIAS\HTTP\Request\RequestFactoryImpl
Definition:
RequestFactoryImpl.php:38
Container
ILIAS\HTTP\Duration\DurationFactory
Definition:
DurationFactory.php:27
ILIAS\HTTP\Duration\Increment\IncrementFactory
Definition:
IncrementFactory.php:25
OutOfBoundsException
RequestFactoryImpl
IncrementFactory
DefaultResponseSenderStrategy
ILIAS\HTTP\Response\Sender\DefaultResponseSenderStrategy
Class DefaultResponseSenderStrategy.
Definition:
DefaultResponseSenderStrategy.php:28
InitHttpServices\init
init(Container $container)
Definition:
InitHttpServices.php:33
InitHttpServices
Responsible for loading the HTTP Service into the dependency injection container of ILIAS...
Definition:
InitHttpServices.php:31
DurationFactory
components
ILIAS
Init
classes
Dependencies
InitHttpServices.php
Generated on Wed Sep 10 2025 15:15:48 for ILIAS by
1.8.13 (using
Doxyfile
)