ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSetupAgent Class Reference

Contains common objectives for the setup. More...

+ Inheritance diagram for ilSetupAgent:
+ Collaboration diagram for ilSetupAgent:

Public Member Functions

 __construct (Refinery\Factory $refinery, Data\Factory $data, \ilSetupPasswordManager $password_manager)
 
 hasConfig ()
 
 getConfigInput (Setup\Config $config=null)
 
 getArrayToConfigTransformation ()
 
 getInstallObjective (Setup\Config $config=null)
 
 getUpdateObjective (Setup\Config $config=null)
 
 getBuildArtifactObjective ()
 

Data Fields

const PHP_MEMORY_LIMIT = "128M"
 

Protected Member Functions

 getPHPMemoryLimitCondition ()
 

Protected Attributes

 $refinery
 
 $data
 
 $password_manager
 

Detailed Description

Contains common objectives for the setup.

Do not make additions here, in general all this stuff here is supposed to go elsewhere once we find out which service it really belongs to.

Definition at line 15 of file class.ilSetupAgent.php.

Constructor & Destructor Documentation

◆ __construct()

ilSetupAgent::__construct ( Refinery\Factory  $refinery,
Data\Factory  $data,
\ilSetupPasswordManager  $password_manager 
)

Definition at line 34 of file class.ilSetupAgent.php.

References $data, $password_manager, and $refinery.

38  {
39  $this->refinery = $refinery;
40  $this->data = $data;
41  $this->password_manager = $password_manager;
42  }

Member Function Documentation

◆ getArrayToConfigTransformation()

ilSetupAgent::getArrayToConfigTransformation ( )

Definition at line 63 of file class.ilSetupAgent.php.

References $data, and $password.

63  : Refinery\Transformation
64  {
65  return $this->refinery->custom()->transformation(function ($data) {
66  $password = $this->refinery->to()->data("password");
67  $datetimezone = $this->refinery->to()->toNew(\DateTimeZone::class);
68  return new \ilSetupConfig(
69  $data["client_id"],
70  $password->transform($data["master_password"]),
71  $datetimezone->transform([$data["server_timezone"] ?? "UTC"]),
72  $data["register_nic"] ?? false
73  );
74  });
75  }
$password
Definition: cron.php:14

◆ getBuildArtifactObjective()

ilSetupAgent::getBuildArtifactObjective ( )

Definition at line 129 of file class.ilSetupAgent.php.

129  : Setup\Objective
130  {
131  return new Setup\NullObjective();
132  }

◆ getConfigInput()

ilSetupAgent::getConfigInput ( Setup\Config  $config = null)

Definition at line 55 of file class.ilSetupAgent.php.

55  : UI\Component\Input\Field\Input
56  {
57  throw new \LogicException("Not yet implemented.");
58  }

◆ getInstallObjective()

ilSetupAgent::getInstallObjective ( Setup\Config  $config = null)

Definition at line 80 of file class.ilSetupAgent.php.

References $config, and getPHPMemoryLimitCondition().

80  : Setup\Objective
81  {
82  return new Setup\ObjectiveWithPreconditions(
85  new Setup\ObjectiveCollection(
86  "Complete common ILIAS objectives.",
87  false,
88  new Setup\PHPVersionCondition("7.2.0"),
89  new Setup\PHPExtensionLoadedCondition("dom"),
90  new Setup\PHPExtensionLoadedCondition("xsl"),
91  new Setup\PHPExtensionLoadedCondition("gd"),
93  new ilSetupConfigStoredObjective($config, $this->password_manager),
94  $config->getRegisterNIC()
97  )
98  );
99  }
A objective collection is a objective that is achieved once all subobjectives are achieved...
There seems to already exist an ILIAS installation, an interaction with it should be confirmed...
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68
+ Here is the call graph for this function:

◆ getPHPMemoryLimitCondition()

ilSetupAgent::getPHPMemoryLimitCondition ( )
protected

Definition at line 101 of file class.ilSetupAgent.php.

Referenced by getInstallObjective().

101  : Setup\Objective
102  {
103  return new Setup\ExternalConditionObjective(
104  "PHP memory limit >= " . self::PHP_MEMORY_LIMIT,
105  function (Setup\Environment $env) : bool {
106  $limit = ini_get("memory_limit");
107  if ($limit == -1) {
108  return true;
109  }
110  $expected = $this->data->dataSize(self::PHP_MEMORY_LIMIT);
111  $current = $this->data->dataSize($limit);
112  return $current->inBytes() >= $expected->inBytes();
113  },
114  "To properly execute ILIAS, please take care that the PHP memory limit is at least set to 128M."
115  );
116  }
An environment holds resources to be used in the setup process.
Definition: Environment.php:11
+ Here is the caller graph for this function:

◆ getUpdateObjective()

ilSetupAgent::getUpdateObjective ( Setup\Config  $config = null)

Definition at line 121 of file class.ilSetupAgent.php.

121  : Setup\Objective
122  {
123  return new Setup\NullObjective();
124  }

◆ hasConfig()

ilSetupAgent::hasConfig ( )

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

47  : bool
48  {
49  return true;
50  }

Field Documentation

◆ $data

ilSetupAgent::$data
protected

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

Referenced by __construct(), and getArrayToConfigTransformation().

◆ $password_manager

ilSetupAgent::$password_manager
protected

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

Referenced by __construct().

◆ $refinery

ilSetupAgent::$refinery
protected

Definition at line 22 of file class.ilSetupAgent.php.

Referenced by __construct().

◆ PHP_MEMORY_LIMIT

const ilSetupAgent::PHP_MEMORY_LIMIT = "128M"

Definition at line 17 of file class.ilSetupAgent.php.


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