ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
Agent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
30
34class Agent implements \ILIAS\Setup\Agent
35{
36 public function getInstallObjective(?Config $config = null): Objective
37 {
38 return new ObjectiveCollection(
39 'WebDAV',
40 true,
42 );
43 }
44
45 public function getUpdateObjective(?Config $config = null): Objective
46 {
47 return new ObjectiveCollection(
48 'WebDAV',
49 true,
51 );
52 }
53
54 public function hasConfig(): bool
55 {
56 return false;
57 }
58
60 {
61 throw new \LogicException('This agent does not support configuration');
62 }
63
64 public function getBuildObjective(): Objective
65 {
66 return new NullObjective();
67 }
68
69 public function getNamedObjectives(?Config $config = null): array
70 {
71 return [];
72 }
73
74 public function getStatusObjective(Storage $storage): Objective
75 {
76 return new NullObjective();
77 }
78
79 public function getMigrations(): array
80 {
81 return [];
82 }
83}
A objective collection is a objective that is achieved once all subobjectives are achieved.
A non-objective, nothing to do to achieve it...
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.
Definition: Agent.php:36
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
Definition: Agent.php:59
getNamedObjectives(?Config $config=null)
Gets all named objectives The keys of the returned array are the commands.
Definition: Agent.php:69
getMigrations()
Get a named map of migrations available for this Agent.
Definition: Agent.php:79
hasConfig()
Does this agent require a configuration?
Definition: Agent.php:54
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
Definition: Agent.php:64
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.
Definition: Agent.php:45
getStatusObjective(Storage $storage)
Definition: Agent.php:74
A transformation is a function from one datatype to another.
A agent is some component that performs part of the setup process.
Definition: Agent.php:30
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