ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Agent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
31 
32 class Agent implements AgentInterface
33 {
34  public function __construct(private readonly Refinery $refinery)
35  {
36  }
37 
38  public function hasConfig(): bool
39  {
40  return false;
41  }
42 
44  {
45  return $this->refinery->identity();
46  }
47 
48  public function getInstallObjective(?Config $config = null): Objective
49  {
50  return new NullObjective();
51  }
52 
53  public function getUpdateObjective(?Config $config = null): Objective
54  {
55  return new ilTreeAdminNodeAddedObjective('dpro', 'DataProtection');
56  }
57 
58  public function getBuildObjective(): Objective
59  {
60  return new NullObjective();
61  }
62 
63  public function getStatusObjective(Storage $storage): Objective
64  {
65  return new NullObjective();
66  }
67 
68  public function getMigrations(): array
69  {
70  return [];
71  }
72 
73  public function getNamedObjectives(?Config $config = null): array
74  {
75  return [];
76  }
77 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
getStatusObjective(Storage $storage)
Definition: Agent.php:63
hasConfig()
Does this agent require a configuration?
Definition: Agent.php:38
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
Definition: Agent.php:58
A non-objective, nothing to do to achieve it...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getInstallObjective(?Config $config=null)
Definition: Agent.php:48
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
Definition: Agent.php:43
A transformation is a function from one datatype to another.
getUpdateObjective(?Config $config=null)
Definition: Agent.php:53
A configuration for the setup.
Definition: Config.php:26
getNamedObjectives(?Config $config=null)
Definition: Agent.php:73
getMigrations()
Get a named map of migrations available for this Agent.
Definition: Agent.php:68
__construct(private readonly Refinery $refinery)
Definition: Agent.php:34