ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUtilitiesSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Setup;
23
25{
26 use Setup\Agent\HasNoNamedObjective;
27
28 protected Refinery\Factory $refinery;
29
31 {
32 $this->refinery = $refinery;
33 }
34
38 public function hasConfig(): bool
39 {
40 return true;
41 }
42
47 {
48 return $this->refinery->custom()->transformation(function ($data) {
49 return new ilUtilitiesSetupConfig(
50 $data["path_to_convert"] ?? "/usr/bin/convert",
51 $data["path_to_zip"] ?? "/usr/bin/zip",
52 $data["path_to_unzip"] ?? "/usr/bin/unzip"
53 );
54 });
55 }
56
60 public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
61 {
63 return new ilUtilitiesConfigStoredObjective($config);
64 }
65
69 public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
70 {
71 if ($config !== null) {
73 return new ilUtilitiesConfigStoredObjective($config);
74 }
75 return new Setup\Objective\NullObjective();
76 }
77
82 {
84 }
85
89 public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
90 {
91 return new ilUtilitiesMetricsCollectedObjective($storage);
92 }
93
97 public function getMigrations(): array
98 {
99 return [];
100 }
101}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
A non-objective, nothing to do to achieve it...
Stores configuration for the Utilities service (paths to various tools) in the according ini-fields.
getStatusObjective(Setup\Metrics\Storage $storage)
__construct(Refinery\Factory $refinery)
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
Storage is simple key/value store without further schema definition.
Definition: Storage.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...