ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilVirusScannerFactory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilVirusScannerFactory:

Static Public Member Functions

static _getInstance ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 21 of file class.ilVirusScannerFactory.php.

Member Function Documentation

◆ _getInstance()

static ilVirusScannerFactory::_getInstance ( )
static

Definition at line 23 of file class.ilVirusScannerFactory.php.

References $DIC.

Referenced by ilLTIConsumerAdministrationGUI\checkIconFileVirus(), ilInitialisation\initFileUploadService(), VirusScannerFactoryTest\testAntiVirScanStrategyCanBeRetrievedAccordingToGlobalSetting(), VirusScannerFactoryTest\testClamAvScanStrategyCanBeRetrievedAccordingToGlobalSetting(), VirusScannerFactoryTest\testIcapClientScanStrategyCanBeRetrievedAccordingToGlobalSetting(), VirusScannerFactoryTest\testSophosScanStrategyCanBeRetrievedAccordingToGlobalSetting(), ilQTIParser\virusDetected(), and ilVirusScanner\virusHandling().

24  {
25  $vs = null;
26 
27  if (IL_VIRUS_SCANNER === "icap") {
28  if (strlen(IL_ICAP_CLIENT) > 0) {
29  $vs = new ilVirusScannerICapClient('', '');
30  } else {
31  $vs = new ilVirusScannerICapRemoteAvClient('', '');
32  }
33  } else {
34  switch (IL_VIRUS_SCANNER) {
35  case "Sophos":
36  $vs = new ilVirusScannerSophos(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
37  break;
38  case "AntiVir":
39  global $DIC;
40  $DIC->logger()->root()->error('AntiVir is deprecated, please install and use a different virus scanner.');
41  $vs = new ilVirusScannerAntiVir(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
42  break;
43  case "ClamAV":
44  $vs = new ilVirusScannerClamAV(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
45  break;
46  }
47  }
48  return $vs;
49  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

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