ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilFileSystemSetupAgent Class Reference
+ Inheritance diagram for ilFileSystemSetupAgent:
+ Collaboration diagram for ilFileSystemSetupAgent:

Public Member Functions

 __construct (protected 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 (?Config $config=null)
 Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set according configuration values in the installation.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent..
More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update.The provided configuration is to be used to change according configuration values in the installation. If this is not possible for some reason, an according UnachievableException needs to be thrown in the according objective.The configuration is not to be used to initialize the required environment for the objectives. This must be done via ClientIdReadObjective and depending objectives like ilIniFilesLoadedObjective.If no configuration is provided the configuration of the component should stay as is.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent..
More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts.
Exceptions
InvalidArgumentExceptionif Config does not match the Agent.
More...
 
 getStatusObjective (Storage $storage)
 
 getMigrations ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array. More...
 
 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...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilFileSystemSetupAgent::__construct ( protected Factory  $refinery)

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

33 {
34 }

Member Function Documentation

◆ getArrayToConfigTransformation()

ilFileSystemSetupAgent::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.ilFileSystemSetupAgent.php.

48 {
49 return $this->refinery->custom()->transformation(fn($data): \ilFileSystemSetupConfig => new \ilFileSystemSetupConfig(
50 $data["data_dir"]
51 ));
52 }
A transformation is a function from one datatype to another.

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

+ Here is the call graph for this function:

◆ getBuildObjective()

ilFileSystemSetupAgent::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 78 of file class.ilFileSystemSetupAgent.php.

78 : Objective
79 {
80 return new NullObjective();
81 }
A non-objective, nothing to do to achieve it...
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31

◆ getInstallObjective()

ilFileSystemSetupAgent::getInstallObjective ( ?Config  $config = null)

Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set according configuration values in the installation.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

@noinspection PhpParamsInspection

Implements ILIAS\Setup\Agent.

Definition at line 57 of file class.ilFileSystemSetupAgent.php.

◆ getMigrations()

ilFileSystemSetupAgent::getMigrations ( )

@inheritDoc

Implements ILIAS\Setup\Agent.

Definition at line 94 of file class.ilFileSystemSetupAgent.php.

94 : array
95 {
96 return [];
97 }

◆ getStatusObjective()

ilFileSystemSetupAgent::getStatusObjective ( Storage  $storage)

◆ getUpdateObjective()

ilFileSystemSetupAgent::getUpdateObjective ( ?Config  $config = null)

Get the goal the agent wants to achieve on update.The provided configuration is to be used to change according configuration values in the installation. If this is not possible for some reason, an according UnachievableException needs to be thrown in the according objective.The configuration is not to be used to initialize the required environment for the objectives. This must be done via ClientIdReadObjective and depending objectives like ilIniFilesLoadedObjective.If no configuration is provided the configuration of the component should stay as is.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

@noinspection PhpParamsInspection

Implements ILIAS\Setup\Agent.

Definition at line 66 of file class.ilFileSystemSetupAgent.php.

66 : Objective
67 {
68 if ($config !== null) {
70 return new ilFileSystemConfigNotChangedObjective($config);
71 }
72 return new NullObjective();
73 }

◆ hasConfig()

ilFileSystemSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

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

39 : bool
40 {
41 return true;
42 }

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