ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
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  {
56  }
57 
58  public function getBuildObjective(): Objective
59  {
60  return new ConsumerObjective();
61  }
62 
63  public function getStatusObjective(Storage $storage): Objective
64  {
65  return new \ilDatabaseUpdateStepsMetricsCollectedObjective($storage, new UpdateSteps());
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 }
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
Definition: Agent.php:43
getUpdateObjective(?Config $config=null)
Definition: Agent.php:53
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Agent.php:21
getInstallObjective(?Config $config=null)
Definition: Agent.php:48
getNamedObjectives(?Config $config=null)
Definition: Agent.php:73
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
__construct(private readonly Refinery $refinery)
Definition: Agent.php:34
getMigrations()
Get a named map of migrations available for this Agent.
Definition: Agent.php:68
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:26