ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilHttpSetupAgent.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
3/* Copyright (c) 2020 Daniel Weise <daniel.weise@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
7use ILIAS\Data;
8use ILIAS\UI;
9
11{
12 use Setup\Agent\HasNoNamedObjective;
13
17 protected $refinery;
18
19 public function __construct(
20 Refinery\Factory $refinery
21 ) {
22 $this->refinery = $refinery;
23 }
24
28 public function hasConfig() : bool
29 {
30 return true;
31 }
32
37 {
38 return $this->refinery->custom()->transformation(function ($data) {
39 return new \ilHttpSetupConfig(
40 $data["path"],
41 (isset($data["https_autodetection"]) && $data["https_autodetection"])
42 ? true
43 : false,
44 (isset($data["https_autodetection"]) && $data["https_autodetection"])
45 ? $data["https_autodetection"]["header_name"]
46 : null,
47 (isset($data["https_autodetection"]) && $data["https_autodetection"])
48 ? $data["https_autodetection"]["header_value"]
49 : null,
50 (isset($data["proxy"]) && $data["proxy"])
51 ? true
52 : false,
53 (isset($data["proxy"]) && $data["proxy"])
54 ? $data["proxy"]["host"]
55 : null,
56 (isset($data["proxy"]) && $data["proxy"])
57 ? $data["proxy"]["port"]
58 : null,
59 );
60 });
61 }
62
66 public function getInstallObjective(Setup\Config $config = null) : Setup\Objective
67 {
68 $http_config_stored = new ilHttpConfigStoredObjective($config);
69
70 if (!$config->isProxyEnabled()) {
71 return $http_config_stored;
72 }
73
75 $http_config_stored,
77 );
78 }
79
83 public function getUpdateObjective(Setup\Config $config = null) : Setup\Objective
84 {
85 if ($config !== null) {
87 }
89 }
90
94 public function getBuildArtifactObjective() : Setup\Objective
95 {
97 }
98
102 public function getStatusObjective(Setup\Metrics\Storage $storage) : Setup\Objective
103 {
104 return new ilHttpMetricsCollectedObjective($storage);
105 }
106
110 public function getMigrations() : array
111 {
112 return [];
113 }
114}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
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)
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:14
A configuration for the setup.
Definition: Config.php:11
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:15
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$data
Definition: storeScorm.php:23