ILIAS  release_7 Revision v7.30-3-g800a261c036
ilVirusScannerMetricsCollectedObjective Class Reference
+ Inheritance diagram for ilVirusScannerMetricsCollectedObjective:
+ Collaboration diagram for ilVirusScannerMetricsCollectedObjective:

Public Member Functions

 getTentativePreconditions (Setup\Environment $environment)
 
 collectFrom (Setup\Environment $environment, Setup\Metrics\Storage $storage)
 

Detailed Description

Member Function Documentation

◆ collectFrom()

ilVirusScannerMetricsCollectedObjective::collectFrom ( Setup\Environment  $environment,
Setup\Metrics\Storage  $storage 
)

Definition at line 16 of file class.ilVirusScannerMetricsCollectedObjective.php.

16 : void
17 {
18 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
19 if (!$ini) {
20 return;
21 }
22
23 $virus_scanner = $ini->readVariable("tools", "vscantype");
24 $storage->storeConfigText(
25 "virusscanner",
26 $virus_scanner,
27 "The engine that is used for virus scanning."
28 );
29
30 if ($virus_scanner === ilVirusScannerSetupConfig::VIRUS_SCANNER_ICAP) {
31 $storage->storeConfigText(
32 "icap_client_path",
33 $ini->readVariable("tools", "icap_client_path"),
34 "The configured ICAP client path."
35 );
36 $storage->storeConfigText(
37 "icap_host",
38 $ini->readVariable("tools", "icap_host"),
39 "The configured ICAP host."
40 );
41 $storage->storeConfigText(
42 "icap_port",
43 $ini->readVariable("tools", "icap_port"),
44 "The configured ICAP port."
45 );
46 $storage->storeConfigText(
47 "icap_service_name",
48 $ini->readVariable("tools", "icap_service_name"),
49 "The configured ICAP service name."
50 );
51 } elseif (is_string($virus_scanner) &&
52 $virus_scanner !== '' &&
54 $storage->storeConfigText(
55 "path_to_scan",
56 $ini->readVariable("tools", "scancommand"),
57 "The path to the binary that is used for virus scanning."
58 );
59 $storage->storeConfigText(
60 "path_to_clean",
61 $ini->readVariable("tools", "cleancommand"),
62 "The path to the binary that is used for cleaning up after virus scanning."
63 );
64 }
65 }
$ini
Definition: raiseError.php:4

References $ini, ilVirusScannerSetupConfig\VIRUS_SCANNER_ICAP, and ilVirusScannerSetupConfig\VIRUS_SCANNER_NONE.

◆ getTentativePreconditions()

ilVirusScannerMetricsCollectedObjective::getTentativePreconditions ( Setup\Environment  $environment)

Definition at line 9 of file class.ilVirusScannerMetricsCollectedObjective.php.

9 : array
10 {
11 return [
13 ];
14 }

The documentation for this class was generated from the following file: