ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBackgroundTasksSetupAgent Class Reference
+ Inheritance diagram for ilBackgroundTasksSetupAgent:
+ Collaboration diagram for ilBackgroundTasksSetupAgent:

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)
 
 getUpdateObjective (?Config $config=null)
 
 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 ()
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 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...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Detailed Description

Definition at line 29 of file class.ilBackgroundTasksSetupAgent.php.

Constructor & Destructor Documentation

◆ __construct()

ilBackgroundTasksSetupAgent::__construct ( protected Factory  $refinery)

Definition at line 33 of file class.ilBackgroundTasksSetupAgent.php.

34  {
35  }

Member Function Documentation

◆ getArrayToConfigTransformation()

ilBackgroundTasksSetupAgent::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 48 of file class.ilBackgroundTasksSetupAgent.php.

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

49  {
50  return $this->refinery->custom()->transformation(fn($data): \ilBackgroundTasksSetupConfig => new \ilBackgroundTasksSetupConfig(
52  $data["max_number_of_concurrent_tasks"] ?? 1
53  ));
54  }
A transformation is a function from one datatype to another.
+ Here is the call graph for this function:

◆ getBuildObjective()

ilBackgroundTasksSetupAgent::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 80 of file class.ilBackgroundTasksSetupAgent.php.

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

◆ getInstallObjective()

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

PhpParamsInspection

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

59  : Objective
60  {
62  return new ilBackgroundTasksConfigStoredObjective($config);
63  }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30

◆ getMigrations()

ilBackgroundTasksSetupAgent::getMigrations ( )

Implements ILIAS\Setup\Agent.

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

101  : array
102  {
103  return [];
104  }

◆ getStatusObjective()

ilBackgroundTasksSetupAgent::getStatusObjective ( Storage  $storage)

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

88  : Objective
89  {
90  return new ObjectiveCollection(
91  'Component BackgroundTasks',
92  true,
95  );
96  }
A objective collection is a objective that is achieved once all subobjectives are achieved...
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getUpdateObjective()

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

PhpParamsInspection

Definition at line 68 of file class.ilBackgroundTasksSetupAgent.php.

References null.

68  : Objective
69  {
70  if ($config !== null) {
72  return new ilBackgroundTasksConfigStoredObjective($config);
73  }
74  return new NullObjective();
75  }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
A non-objective, nothing to do to achieve it...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ hasConfig()

ilBackgroundTasksSetupAgent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 40 of file class.ilBackgroundTasksSetupAgent.php.

40  : bool
41  {
42  return true;
43  }

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