ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.ilHttpSetupConfig.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\Setup
;
20
21
class
ilHttpSetupConfig
implements
Setup\Config
22
{
23
protected
string
$http_path
;
24
protected
bool
$forced
=
false
;
25
protected
bool
$autodetection_enabled
;
26
protected
?
string
$header_name
;
27
protected
?
string
$header_value
;
28
protected
bool
$proxy_enabled
;
29
protected
?
string
$proxy_host
;
30
protected
?
string
$proxy_port
;
32
protected
?array
$allowed_hosts
=
null
;
33
37
public
function
__construct
(
38
string
$http_path
,
39
bool
$autodetection_enabled
,
40
bool
$forced
,
41
?
string
$header_name
,
42
?
string
$header_value
,
43
bool
$proxy_enabled
,
44
?
string
$proxy_host
,
45
?
string
$proxy_port
,
46
?array
$allowed_hosts
47
) {
48
if
(
$autodetection_enabled
&& (!
$header_name
|| !
$header_value
)) {
49
throw
new \InvalidArgumentException(
50
"Expected header name and value for https autodetection if that feature is enabled."
51
);
52
}
53
if
(
$proxy_enabled
&& (!
$proxy_host
|| !
$proxy_port
)) {
54
throw
new \InvalidArgumentException(
55
"Expected setting for proxy host and port if proxy is enabled."
56
);
57
}
58
$this->http_path =
$http_path
;
59
$this->autodetection_enabled =
$autodetection_enabled
;
60
$this->forced =
$forced
;
61
$this->header_name =
$header_name
;
62
$this->header_value =
$header_value
;
63
$this->proxy_enabled =
$proxy_enabled
;
64
$this->proxy_host =
$proxy_host
;
65
$this->proxy_port =
$proxy_port
;
66
67
if
(is_array(
$allowed_hosts
)) {
68
$this->allowed_hosts = array_values(array_filter(array_map(strval(...),
$allowed_hosts
)));
69
}
70
}
71
72
73
public
function
isForced
(): bool
74
{
75
return
$this->forced
;
76
}
77
78
public
function
getHttpPath
(): string
79
{
80
return
$this->http_path
;
81
}
82
83
public
function
isAutodetectionEnabled
(): bool
84
{
85
return
$this->autodetection_enabled
;
86
}
87
88
public
function
getHeaderName
(): ?string
89
{
90
return
$this->header_name
;
91
}
92
93
public
function
getHeaderValue
(): ?string
94
{
95
return
$this->header_value
;
96
}
97
98
public
function
isProxyEnabled
(): bool
99
{
100
return
$this->proxy_enabled
;
101
}
102
103
public
function
getProxyHost
(): ?string
104
{
105
return
$this->proxy_host
;
106
}
107
108
public
function
getProxyPort
(): ?string
109
{
110
return
$this->proxy_port
;
111
}
112
116
public
function
getAllowedHosts
(): ?array
117
{
118
return
$this->allowed_hosts
;
119
}
120
}
ilHttpSetupConfig
Definition:
class.ilHttpSetupConfig.php:22
ilHttpSetupConfig\getHttpPath
getHttpPath()
Definition:
class.ilHttpSetupConfig.php:78
ilHttpSetupConfig\$proxy_host
string $proxy_host
Definition:
class.ilHttpSetupConfig.php:29
ilHttpSetupConfig\getHeaderValue
getHeaderValue()
Definition:
class.ilHttpSetupConfig.php:93
ilHttpSetupConfig\$header_name
string $header_name
Definition:
class.ilHttpSetupConfig.php:26
ilHttpSetupConfig\$autodetection_enabled
bool $autodetection_enabled
Definition:
class.ilHttpSetupConfig.php:25
ilHttpSetupConfig\getHeaderName
getHeaderName()
Definition:
class.ilHttpSetupConfig.php:88
ilHttpSetupConfig\getProxyPort
getProxyPort()
Definition:
class.ilHttpSetupConfig.php:108
ilHttpSetupConfig\getProxyHost
getProxyHost()
Definition:
class.ilHttpSetupConfig.php:103
ilHttpSetupConfig\isProxyEnabled
isProxyEnabled()
Definition:
class.ilHttpSetupConfig.php:98
ilHttpSetupConfig\isForced
isForced()
Definition:
class.ilHttpSetupConfig.php:73
ilHttpSetupConfig\__construct
__construct(string $http_path, bool $autodetection_enabled, bool $forced, ?string $header_name, ?string $header_value, bool $proxy_enabled, ?string $proxy_host, ?string $proxy_port, ?array $allowed_hosts)
Definition:
class.ilHttpSetupConfig.php:37
ilHttpSetupConfig\$allowed_hosts
array $allowed_hosts
Definition:
class.ilHttpSetupConfig.php:32
ilHttpSetupConfig\$forced
bool $forced
Definition:
class.ilHttpSetupConfig.php:24
ilHttpSetupConfig\$proxy_enabled
bool $proxy_enabled
Definition:
class.ilHttpSetupConfig.php:28
ilHttpSetupConfig\$proxy_port
string $proxy_port
Definition:
class.ilHttpSetupConfig.php:30
ilHttpSetupConfig\$http_path
string $http_path
Definition:
class.ilHttpSetupConfig.php:23
ilHttpSetupConfig\$header_value
string $header_value
Definition:
class.ilHttpSetupConfig.php:27
ilHttpSetupConfig\getAllowedHosts
getAllowedHosts()
Definition:
class.ilHttpSetupConfig.php:116
ilHttpSetupConfig\isAutodetectionEnabled
isAutodetectionEnabled()
Definition:
class.ilHttpSetupConfig.php:83
ILIAS\Setup\Config
A configuration for the setup.
Definition:
Config.php:27
ILIAS\Setup
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilMysqlMyIsamToInnoDbMigration.php:19
components
ILIAS
Http_
classes
Setup
class.ilHttpSetupConfig.php
Generated on Sat Oct 18 2025 23:03:10 for ILIAS by
1.9.4 (using
Doxyfile
)