ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\OnScreenChat\Setup\Agent Class Reference
+ Inheritance diagram for ILIAS\OnScreenChat\Setup\Agent:
+ Collaboration diagram for ILIAS\OnScreenChat\Setup\Agent:

Public Member Functions

 __construct (private readonly Refinery $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

Definition at line 33 of file Agent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\OnScreenChat\Setup\Agent::__construct ( private readonly Refinery  $refinery)

Definition at line 35 of file Agent.php.

36 {
37 }

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\OnScreenChat\Setup\Agent::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 44 of file Agent.php.

44 : Transformation
45 {
46 return $this->refinery->identity();
47 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getBuildObjective()

ILIAS\OnScreenChat\Setup\Agent::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 59 of file Agent.php.

59 : Objective
60 {
61 return new NullObjective();
62 }

◆ getInstallObjective()

ILIAS\OnScreenChat\Setup\Agent::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 49 of file Agent.php.

49 : Objective
50 {
51 return new NullObjective();
52 }

◆ getMigrations()

ILIAS\OnScreenChat\Setup\Agent::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 69 of file Agent.php.

69 : array
70 {
71 return [];
72 }

◆ getNamedObjectives()

ILIAS\OnScreenChat\Setup\Agent::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 74 of file Agent.php.

74 : array
75 {
76 return [];
77 }

◆ getStatusObjective()

ILIAS\OnScreenChat\Setup\Agent::getStatusObjective ( Storage  $storage)

Definition at line 64 of file Agent.php.

◆ getUpdateObjective()

ILIAS\OnScreenChat\Setup\Agent::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 54 of file Agent.php.

54 : Objective
55 {
56 return new ilDatabaseUpdateStepsExecutedObjective(new UpdateSteps());
57 }
This class attempt to achieve a set of database update steps.

◆ hasConfig()

ILIAS\OnScreenChat\Setup\Agent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 39 of file Agent.php.

39 : bool
40 {
41 return false;
42 }

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