ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilVirusScannerSetupAgent.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23use ILIAS\Setup;
24
26{
27 use Setup\Agent\HasNoNamedObjective;
28
29 protected Factory $refinery;
30
31 public function __construct(
33 ) {
34 $this->refinery = $refinery;
35 }
36
37 public function hasConfig(): bool
38 {
39 return true;
40 }
41
43 {
44 return $this->refinery->custom()->transformation(fn($data): ilVirusScannerSetupConfig => new ilVirusScannerSetupConfig(
46 $data['path_to_scan'] ?? null,
47 $data['path_to_clean'] ?? null,
48 $data['icap_host'] ?? null,
49 $data['icap_port'] ?? null,
50 $data['icap_service_name'] ?? null,
51 $data['icap_client_path'] ?? null,
52 ));
53 }
54
55 public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
56 {
57 return new ilVirusScannerConfigStoredObjective($config);
58 }
59
60 public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
61 {
62 if ($config !== null) {
63 return new ilVirusScannerConfigStoredObjective($config);
64 }
65
67 }
68
70 {
72 }
73
74 public function getStatusObjective(?Setup\Metrics\Storage $storage): Setup\Objective
75 {
76 return new ilVirusScannerMetricsCollectedObjective($storage);
77 }
78
79 public function getMigrations(): array
80 {
81 return [];
82 }
83}
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...
getStatusObjective(?Setup\Metrics\Storage $storage)
getInstallObjective(?Setup\Config $config=null)
getUpdateObjective(?Setup\Config $config=null)
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...