ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Setup\Objective Interface Reference

An objective is a desired state of the system that is supposed to be created by the setup. More...

+ Inheritance diagram for ILIAS\Setup\Objective:
+ Collaboration diagram for ILIAS\Setup\Objective:

Public Member Functions

 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Detailed Description

An objective is a desired state of the system that is supposed to be created by the setup.

This interface would benefit from generics, in fact it would be parametrized with a Config-type.

Definition at line 30 of file Objective.php.

Member Function Documentation

◆ achieve()

ILIAS\Setup\Objective::achieve ( Environment  $environment)

Objectives can be achieved.

They might add resources to the environment when they have been achieved.

This method needs to be idempotent for a given environment. That means: if this is executed a second time, nothing new should happen. Or the other way round: if the environment already looks like desired, the objective should not take any further actions when this is called.

Exceptions

Implemented in ILIAS\Setup\ObjectiveCollection, ilDatabaseUpdateStepsExecutedObjective, ilDataCollectionObjective, and ilLoggingConfigStoredObjective.

Referenced by ILIAS\Setup\Objective\MigrationObjective\getPreconditions().

+ Here is the caller graph for this function:

◆ getHash()

◆ getLabel()

◆ getPreconditions()

ILIAS\Setup\Objective::getPreconditions ( Environment  $environment)

Objectives might depend on other objectives.

Exceptions
UnachievableExceptionif the objective is not achievable
Returns
Objective[]

Implemented in ILIAS\Setup\ObjectiveCollection, ilDatabaseUpdateStepsExecutedObjective, ilDataCollectionObjective, and ilLoggingConfigStoredObjective.

◆ isApplicable()

ILIAS\Setup\Objective::isApplicable ( Environment  $environment)

Get to know whether the objective is applicable.

Don't change the environment or cause changes on services in the environment. Just check if this objective needs to be achieved, either currently or at all. In case of doubt whether the objective is applicable or not return true.

Implemented in ilDatabaseUpdateStepsExecutedObjective, ILIAS\Setup\ObjectiveCollection, and ilLoggingConfigStoredObjective.

◆ isNotable()


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