ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilVirusScannerSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 use ILIAS\Refinery;
23 use ILIAS\Setup;
24 
25 class ilVirusScannerSetupAgent implements Setup\Agent
26 {
28 
29  protected Factory $refinery;
30 
31  public function __construct(
32  Factory $refinery
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  }
65  return new Setup\Objective\NullObjective();
66  }
67 
68  public function getBuildArtifactObjective(): Setup\Objective
69  {
70  return new Setup\Objective\NullObjective();
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 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: ByTrying.php:21
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85
getInstallObjective(Setup\Config $config=null)
getStatusObjective(Setup\Metrics\Storage $storage)
getUpdateObjective(Setup\Config $config=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
A configuration for the setup.
Definition: Config.php:26