ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilHttpSetupConfig Class Reference
+ Inheritance diagram for ilHttpSetupConfig:
+ Collaboration diagram for ilHttpSetupConfig:

Public Member Functions

 __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)
 
 isForced ()
 
 getHttpPath ()
 
 isAutodetectionEnabled ()
 
 getHeaderName ()
 
 getHeaderValue ()
 
 isProxyEnabled ()
 
 getProxyHost ()
 
 getProxyPort ()
 
 getAllowedHosts ()
 

Protected Attributes

string $http_path
 
bool $forced = false
 
bool $autodetection_enabled
 
string $header_name
 
string $header_value
 
bool $proxy_enabled
 
string $proxy_host
 
string $proxy_port
 
array $allowed_hosts = null
 

Detailed Description

Definition at line 21 of file class.ilHttpSetupConfig.php.

Constructor & Destructor Documentation

◆ __construct()

ilHttpSetupConfig::__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 
)
Parameters
list<string>|null$allowed_hosts

Definition at line 37 of file class.ilHttpSetupConfig.php.

References $autodetection_enabled, $forced, $header_name, $header_value, $http_path, $proxy_enabled, $proxy_host, and $proxy_port.

47  {
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  }

Member Function Documentation

◆ getAllowedHosts()

ilHttpSetupConfig::getAllowedHosts ( )
Returns
list<string>|null

Definition at line 116 of file class.ilHttpSetupConfig.php.

References $allowed_hosts.

116  : ?array
117  {
118  return $this->allowed_hosts;
119  }

◆ getHeaderName()

ilHttpSetupConfig::getHeaderName ( )

Definition at line 88 of file class.ilHttpSetupConfig.php.

References $header_name.

88  : ?string
89  {
90  return $this->header_name;
91  }

◆ getHeaderValue()

ilHttpSetupConfig::getHeaderValue ( )

Definition at line 93 of file class.ilHttpSetupConfig.php.

References $header_value.

93  : ?string
94  {
95  return $this->header_value;
96  }

◆ getHttpPath()

ilHttpSetupConfig::getHttpPath ( )

Definition at line 78 of file class.ilHttpSetupConfig.php.

References $http_path.

Referenced by ilNICKeyRegisteredObjective\getURLStringForNIC().

78  : string
79  {
80  return $this->http_path;
81  }
+ Here is the caller graph for this function:

◆ getProxyHost()

ilHttpSetupConfig::getProxyHost ( )

Definition at line 103 of file class.ilHttpSetupConfig.php.

References $proxy_host.

103  : ?string
104  {
105  return $this->proxy_host;
106  }

◆ getProxyPort()

ilHttpSetupConfig::getProxyPort ( )

Definition at line 108 of file class.ilHttpSetupConfig.php.

References $proxy_port.

108  : ?string
109  {
110  return $this->proxy_port;
111  }

◆ isAutodetectionEnabled()

ilHttpSetupConfig::isAutodetectionEnabled ( )

Definition at line 83 of file class.ilHttpSetupConfig.php.

References $autodetection_enabled.

83  : bool
84  {
86  }

◆ isForced()

ilHttpSetupConfig::isForced ( )

Definition at line 73 of file class.ilHttpSetupConfig.php.

References $forced.

73  : bool
74  {
75  return $this->forced;
76  }

◆ isProxyEnabled()

ilHttpSetupConfig::isProxyEnabled ( )

Definition at line 98 of file class.ilHttpSetupConfig.php.

References $proxy_enabled.

98  : bool
99  {
100  return $this->proxy_enabled;
101  }

Field Documentation

◆ $allowed_hosts

array ilHttpSetupConfig::$allowed_hosts = null
protected

Definition at line 32 of file class.ilHttpSetupConfig.php.

Referenced by getAllowedHosts().

◆ $autodetection_enabled

bool ilHttpSetupConfig::$autodetection_enabled
protected

Definition at line 25 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and isAutodetectionEnabled().

◆ $forced

bool ilHttpSetupConfig::$forced = false
protected

Definition at line 24 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and isForced().

◆ $header_name

string ilHttpSetupConfig::$header_name
protected

Definition at line 26 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and getHeaderName().

◆ $header_value

string ilHttpSetupConfig::$header_value
protected

Definition at line 27 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and getHeaderValue().

◆ $http_path

string ilHttpSetupConfig::$http_path
protected

Definition at line 23 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and getHttpPath().

◆ $proxy_enabled

bool ilHttpSetupConfig::$proxy_enabled
protected

Definition at line 28 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and isProxyEnabled().

◆ $proxy_host

string ilHttpSetupConfig::$proxy_host
protected

Definition at line 29 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and getProxyHost().

◆ $proxy_port

string ilHttpSetupConfig::$proxy_port
protected

Definition at line 30 of file class.ilHttpSetupConfig.php.

Referenced by __construct(), and getProxyPort().


The documentation for this class was generated from the following file: