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

Public Member Functions

 __construct (Refinery\Factory $refinery)
 
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array.
Exceptions
LogicExceptionif Agent has no Config
More...
 
 getInstallObjective (?Setup\Config $config=null)
 
 getUpdateObjective (?Setup\Config $config=null)
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent.
More...
 
 getStatusObjective (Setup\Metrics\Storage $storage)
 
 getMigrations ()
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Protected Attributes

ILIAS Refinery Factory $refinery
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilHttpSetupAgent::__construct ( Refinery\Factory  $refinery)

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

References $refinery, and ILIAS\Repository\refinery().

32  {
33  $this->refinery = $refinery;
34  }
ILIAS Refinery Factory $refinery
+ Here is the call graph for this function:

Member Function Documentation

◆ getArrayToConfigTransformation()

ilHttpSetupAgent::getArrayToConfigTransformation ( )

Agents must be able to tell how to create a configuration from a nested array.

Exceptions
LogicExceptionif Agent has no Config

Implements ILIAS\Setup\Agent.

Definition at line 47 of file class.ilHttpSetupAgent.php.

References $data, null, and ILIAS\Repository\refinery().

47  : Refinery\Transformation
48  {
49  return $this->refinery->custom()->transformation(function ($data): \ilHttpSetupConfig {
50  return new \ilHttpSetupConfig(
51  $data["path"],
52  isset($data["https_autodetection"]) && $data["https_autodetection"],
53  isset($data["forced"]) && $data["forced"],
54  (isset($data["https_autodetection"]) && $data["https_autodetection"])
55  ? $data["https_autodetection"]["header_name"]
56  : null,
57  (isset($data["https_autodetection"]) && $data["https_autodetection"])
58  ? $data["https_autodetection"]["header_value"]
59  : null,
60  isset($data["proxy"]) && $data["proxy"],
61  (isset($data["proxy"]) && $data["proxy"])
62  ? $data["proxy"]["host"]
63  : null,
64  (isset($data["proxy"]) && $data["proxy"])
65  ? $data["proxy"]["port"]
66  : null,
67  $data['allowed_hosts'] ?? null
68  );
69  });
70  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getBuildObjective()

ilHttpSetupAgent::getBuildObjective ( )

Get the goal the agent wants to achieve to build artifacts.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Implements ILIAS\Setup\Agent.

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

103  : Setup\Objective
104  {
105  return new Setup\Objective\NullObjective();
106  }

◆ getInstallObjective()

ilHttpSetupAgent::getInstallObjective ( ?Setup\Config  $config = null)

Definition at line 75 of file class.ilHttpSetupAgent.php.

75  : Setup\Objective
76  {
77  $http_config_stored = new ilHttpConfigStoredObjective($config);
78 
79  if (!$config->isProxyEnabled()) {
80  return $http_config_stored;
81  }
82 
83  return new Setup\Objective\ObjectiveWithPreconditions(
84  $http_config_stored,
85  new ProxyConnectableCondition($config)
86  );
87  }

◆ getMigrations()

ilHttpSetupAgent::getMigrations ( )

Implements ILIAS\Setup\Agent.

Definition at line 119 of file class.ilHttpSetupAgent.php.

119  : array
120  {
121  return [];
122  }

◆ getStatusObjective()

ilHttpSetupAgent::getStatusObjective ( Setup\Metrics\Storage  $storage)

Definition at line 111 of file class.ilHttpSetupAgent.php.

111  : Setup\Objective
112  {
113  return new ilHttpMetricsCollectedObjective($storage);
114  }

◆ getUpdateObjective()

ilHttpSetupAgent::getUpdateObjective ( ?Setup\Config  $config = null)

Definition at line 92 of file class.ilHttpSetupAgent.php.

References null.

92  : Setup\Objective
93  {
94  if ($config !== null) {
95  return new ilHttpConfigStoredObjective($config);
96  }
97  return new Setup\Objective\NullObjective();
98  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ hasConfig()

ilHttpSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 39 of file class.ilHttpSetupAgent.php.

39  : bool
40  {
41  return true;
42  }

Field Documentation

◆ $refinery

ILIAS Refinery Factory ilHttpSetupAgent::$refinery
protected

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

Referenced by __construct().


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