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

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. 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 (Storage $storage)
 
 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...
 
- 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

Author
Lukas Zehnder lukas.nosp@m.@sr..nosp@m.solut.nosp@m.ions @noinspection AutoloadingIssuesInspection

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

Constructor & Destructor Documentation

◆ __construct()

ilADNAgent::__construct ( protected Factory  $refinery)

Definition at line 36 of file class.ilADNAgent.php.

37 {
38 }

Member Function Documentation

◆ getArrayToConfigTransformation()

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

48 {
49 throw new \LogicException("Agent has no config.");
50 }
A transformation is a function from one datatype to another.

◆ getBuildObjective()

ilADNAgent::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 71 of file class.ilADNAgent.php.

71 : Objective
72 {
73 return new NullObjective();
74 }
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()

ilADNAgent::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..

Implements ILIAS\Setup\Agent.

Definition at line 53 of file class.ilADNAgent.php.

53 : Objective
54 {
55 return new NullObjective();
56 }

◆ getMigrations()

ilADNAgent::getMigrations ( )

Get a named map of migrations available for this Agent.

Should also return Migrations that have run completely.

Returns
array<string,Migration>|Migration[]

Implements ILIAS\Setup\Agent.

Definition at line 83 of file class.ilADNAgent.php.

83 : array
84 {
85 return [];
86 }

◆ getNamedObjectives()

ilADNAgent::getNamedObjectives ( ?Config  $config = null)

Gets all named objectives The keys of the returned array are the commands.

Only the AgentCollection should return an array where the cmd of the named objective is the array key.

Parameters
Config | null$config
Returns
array<string|int, ObjectiveConstructor>

Implements ILIAS\Setup\Agent.

Definition at line 88 of file class.ilADNAgent.php.

88 : array
89 {
90 return [];
91 }

◆ getStatusObjective()

◆ getUpdateObjective()

ilADNAgent::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..

Implements ILIAS\Setup\Agent.

Definition at line 59 of file class.ilADNAgent.php.

59 : Objective
60 {
61 return new ObjectiveCollection(
62 "",
63 true,
66 )
67 );
68 }
A objective collection is a objective that is achieved once all subobjectives are achieved.
This class attempt to achieve a set of database update steps.

◆ hasConfig()

ilADNAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 41 of file class.ilADNAgent.php.

41 : bool
42 {
43 return false;
44 }

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