ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilFileSystemSetupAgent.php
Go to the documentation of this file.
1<?php
2
20use ILIAS\Setup\Agent\HasNoNamedObjective;
27
29{
30 use HasNoNamedObjective;
31
32 public function __construct(protected Factory $refinery)
33 {
34 }
35
39 public function hasConfig(): bool
40 {
41 return true;
42 }
43
48 {
49 return $this->refinery->custom()->transformation(fn($data): \ilFileSystemSetupConfig => new \ilFileSystemSetupConfig(
50 $data["data_dir"]
51 ));
52 }
53
57 public function getInstallObjective(?Config $config = null): Objective
58 {
61 }
62
66 public function getUpdateObjective(?Config $config = null): Objective
67 {
68 if ($config !== null) {
70 return new ilFileSystemConfigNotChangedObjective($config);
71 }
72 return new NullObjective();
73 }
74
78 public function getBuildObjective(): Objective
79 {
80 return new NullObjective();
81 }
82
86 public function getStatusObjective(Storage $storage): Objective
87 {
88 return new ilFileSystemMetricsCollectedObjective($storage);
89 }
90
94 public function getMigrations(): array
95 {
96 return [];
97 }
98}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
A non-objective, nothing to do to achieve it...
getInstallObjective(?Config $config=null)
Get the goals the agent wants to achieve on setup.The provided configuration is to be used to set acc...
__construct(protected Factory $refinery)
getUpdateObjective(?Config $config=null)
Get the goal the agent wants to achieve on update.The provided configuration is to be used to change ...
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.
hasConfig()
Does this agent require a configuration?
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