ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilVirusScannerMetricsCollectedObjective Class Reference
+ Inheritance diagram for ilVirusScannerMetricsCollectedObjective:
+ Collaboration diagram for ilVirusScannerMetricsCollectedObjective:

Protected 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 
)
protected

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

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

35  : void
36  {
37  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
38  if (!$ini) {
39  return;
40  }
41 
42  $virus_scanner = $ini->readVariable('tools', 'vscantype');
43  $storage->storeConfigText(
44  'virusscanner',
45  $virus_scanner,
46  'The engine that is used for virus scanning.'
47  );
48 
49  if ($virus_scanner === ilVirusScannerSetupConfig::VIRUS_SCANNER_ICAP) {
50  $storage->storeConfigText(
51  'icap_client_path',
52  $ini->readVariable('tools', 'icap_client_path'),
53  'The configured ICAP client path.'
54  );
55  $storage->storeConfigText(
56  'icap_host',
57  $ini->readVariable('tools', 'icap_host'),
58  'The configured ICAP host.'
59  );
60  $storage->storeConfigText(
61  'icap_port',
62  $ini->readVariable('tools', 'icap_port'),
63  'The configured ICAP port.'
64  );
65  $storage->storeConfigText(
66  'icap_service_name',
67  $ini->readVariable('tools', 'icap_service_name'),
68  'The configured ICAP service name.'
69  );
70  } elseif (is_string($virus_scanner) &&
71  $virus_scanner !== '' &&
73  $storage->storeConfigText(
74  'path_to_scan',
75  $ini->readVariable('tools', 'scancommand'),
76  'The path to the binary that is used for virus scanning.'
77  );
78  $storage->storeConfigText(
79  'path_to_clean',
80  $ini->readVariable('tools', 'cleancommand'),
81  'The path to the binary that is used for cleaning up after virus scanning.'
82  );
83  }
84  }
$ini
Definition: raiseError.php:20

◆ getTentativePreconditions()

ilVirusScannerMetricsCollectedObjective::getTentativePreconditions ( Setup\Environment  $environment)
protected
Returns
ilIniFilesLoadedObjective[]

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

28  : array
29  {
30  return [
32  ];
33  }

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