ILIAS  release_8 Revision v8.24
class.ilHttpSetupAgent.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
7use ILIAS\Data;
8use ILIAS\UI;
9
10/******************************************************************************
11 *
12 * This file is part of ILIAS, a powerful learning management system.
13 *
14 * ILIAS is licensed with the GPL-3.0, you should have received a copy
15 * of said license along with the source code.
16 *
17 * If this is not the case or you just want to try ILIAS, you'll find
18 * us at:
19 * https://www.ilias.de
20 * https://github.com/ILIAS-eLearning
21 *
22 *****************************************************************************/
24{
25 use Setup\Agent\HasNoNamedObjective;
26
27 protected \ILIAS\Refinery\Factory $refinery;
28
29 public function __construct(
30 Refinery\Factory $refinery
31 ) {
32 $this->refinery = $refinery;
33 }
34
38 public function hasConfig(): bool
39 {
40 return true;
41 }
42
47 {
48 return $this->refinery->custom()->transformation(function ($data): \ilHttpSetupConfig {
49 return new \ilHttpSetupConfig(
50 $data["path"],
51 isset($data["https_autodetection"]) && $data["https_autodetection"],
52 isset($data["forced"]) && $data["forced"],
53 (isset($data["https_autodetection"]) && $data["https_autodetection"])
54 ? $data["https_autodetection"]["header_name"]
55 : null,
56 (isset($data["https_autodetection"]) && $data["https_autodetection"])
57 ? $data["https_autodetection"]["header_value"]
58 : null,
59 isset($data["proxy"]) && $data["proxy"],
60 (isset($data["proxy"]) && $data["proxy"])
61 ? $data["proxy"]["host"]
62 : null,
63 (isset($data["proxy"]) && $data["proxy"])
64 ? $data["proxy"]["port"]
65 : null,
66 );
67 });
68 }
69
73 public function getInstallObjective(Setup\Config $config = null): Setup\Objective
74 {
75 $http_config_stored = new ilHttpConfigStoredObjective($config);
76
77 if (!$config->isProxyEnabled()) {
78 return $http_config_stored;
79 }
80
82 $http_config_stored,
84 );
85 }
86
90 public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
91 {
92 if ($config !== null) {
94 }
96 }
97
101 public function getBuildArtifactObjective(): Setup\Objective
102 {
104 }
105
109 public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
110 {
111 return new ilHttpMetricsCollectedObjective($storage);
112 }
113
117 public function getMigrations(): array
118 {
119 return [];
120 }
121}
Builds data types.
Definition: Factory.php:21
A non-objective, nothing to do to achieve it...
A wrapper around an objective that adds some preconditions.
getStatusObjective(Setup\Metrics\Storage $storage)
__construct(Refinery\Factory $refinery)
getUpdateObjective(Setup\Config $config=null)
ILIAS Refinery Factory $refinery
getInstallObjective(Setup\Config $config=null)
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: ByTrying.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...