ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Agent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
31
32class 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}
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.
Definition: Agent.php:48
hasConfig()
Does this agent require a configuration?
Definition: Agent.php:38
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.
Definition: Agent.php:53
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
Definition: Agent.php:43
getMigrations()
Get a named map of migrations available for this Agent.
Definition: Agent.php:68
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
Definition: Agent.php:58
__construct(private readonly Refinery $refinery)
Definition: Agent.php:34
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
Definition: Agent.php:73
getStatusObjective(Storage $storage)
Definition: Agent.php:63
Builds data types.
Definition: Factory.php:36
A non-objective, nothing to do to achieve it...
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:27
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31