ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilHttpSetupConfig.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Setup;
20
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,
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 ) {
49 throw new \InvalidArgumentException(
50 "Expected header name and value for https autodetection if that feature is enabled."
51 );
52 }
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 {
86 }
87
88 public function getHeaderName(): ?string
89 {
90 return $this->header_name;
91 }
92
93 public function getHeaderValue(): ?string
94 {
96 }
97
98 public function isProxyEnabled(): bool
99 {
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 {
119 }
120}
__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)
A configuration for the setup.
Definition: Config.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...