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
32
33class Agent implements AgentInterface
34{
35 public function __construct(private readonly Refinery $refinery)
36 {
37 }
38
39 public function hasConfig(): bool
40 {
41 return false;
42 }
43
45 {
46 return $this->refinery->identity();
47 }
48
49 public function getInstallObjective(?Config $config = null): Objective
50 {
51 return new NullObjective();
52 }
53
54 public function getUpdateObjective(?Config $config = null): Objective
55 {
57 }
58
59 public function getBuildObjective(): Objective
60 {
61 return new NullObjective();
62 }
63
64 public function getStatusObjective(Storage $storage): Objective
65 {
67 }
68
69 public function getMigrations(): array
70 {
71 return [];
72 }
73
74 public function getNamedObjectives(?Config $config = null): array
75 {
76 return [];
77 }
78}
Builds data types.
Definition: Factory.php:36
__construct(private readonly Refinery $refinery)
Definition: Agent.php:35
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
Definition: Agent.php:44
getMigrations()
Get a named map of migrations available for this Agent.
Definition: Agent.php:69
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.
Definition: Agent.php:49
hasConfig()
Does this agent require a configuration?
Definition: Agent.php:39
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
Definition: Agent.php:74
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
Definition: Agent.php:59
getStatusObjective(Storage $storage)
Definition: Agent.php:64
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.
Definition: Agent.php:54
A non-objective, nothing to do to achieve it...
This class attempt to achieve a set of database update steps.
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