ILIAS  release_8 Revision v8.24
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 {
58 }
59
60 public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
61 {
62 if ($config !== null) {
64 }
66 }
67
68 public function getBuildArtifactObjective(): Setup\Objective
69 {
71 }
72
73 public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
74 {
75 return new ilVirusScannerMetricsCollectedObjective($storage);
76 }
77
78 public function getMigrations(): array
79 {
80 return [];
81 }
82}
Builds data types.
Definition: Factory.php:21
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
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: ByTrying.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...