ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilHttpConfigStoredObjective Class Reference
+ Inheritance diagram for ilHttpConfigStoredObjective:
+ Collaboration diagram for ilHttpConfigStoredObjective:

Public Member Functions

 __construct (\ilHttpSetupConfig $config)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $config
 

Detailed Description

Definition at line 7 of file class.ilHttpConfigStoredObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilHttpConfigStoredObjective::__construct ( \ilHttpSetupConfig  $config)

Definition at line 14 of file class.ilHttpConfigStoredObjective.php.

References $config.

Member Function Documentation

◆ achieve()

ilHttpConfigStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 44 of file class.ilHttpConfigStoredObjective.php.

44 : Setup\Environment
45 {
46 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
47
48 $ini->setVariable("server", "http_path", $this->config->getHttpPath());
49 $ini->setVariable("https", "auto_https_detect_enabled", $this->config->isAutodetectionEnabled() ? "1" : "0");
50 $ini->setVariable("https", "auto_https_detect_header_name", $this->config->getHeaderName());
51 $ini->setVariable("https", "auto_https_detect_header_value", $this->config->getHeaderValue());
52
53
54 if (!$ini->write()) {
55 throw new Setup\UnachievableException("Could not write ilias.ini.php");
56 }
57
58 $factory = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
59 $settings = $factory->settingsFor("common");
60 $settings->set("proxy_status", (int) $this->config->isProxyEnabled());
61 $settings->set("proxy_host", $this->config->getProxyHost());
62 $settings->set("proxy_port", $this->config->getProxyPort());
63
64 return $environment;
65 }
$factory
Definition: metadata.php:58
$ini
Definition: raiseError.php:4

References $factory, and $ini.

◆ getHash()

ilHttpConfigStoredObjective::getHash ( )

Definition at line 20 of file class.ilHttpConfigStoredObjective.php.

20 : string
21 {
22 return hash("sha256", self::class);
23 }

◆ getLabel()

ilHttpConfigStoredObjective::getLabel ( )

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

25 : string
26 {
27 return "Store configuration of Services/Http";
28 }

◆ getPreconditions()

ilHttpConfigStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 35 of file class.ilHttpConfigStoredObjective.php.

35 : array
36 {
37 $common_config = $environment->getConfigFor("common");
38 return [
39 new ilIniFilesPopulatedObjective($common_config),
40 new \ilSettingsFactoryExistsObjective()
41 ];
42 }

◆ isNotable()

ilHttpConfigStoredObjective::isNotable ( )

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

30 : bool
31 {
32 return false;
33 }

Field Documentation

◆ $config

ilHttpConfigStoredObjective::$config
protected

Definition at line 12 of file class.ilHttpConfigStoredObjective.php.

Referenced by __construct().


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