ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilVirusScannerFactory Class Reference
+ Collaboration diagram for ilVirusScannerFactory:

Static Public Member Functions

static _getInstance ()
 

Detailed Description

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.

24 {
25 $vs = null;
26
27 if (defined('IL_VIRUS_SCANNER') && IL_VIRUS_SCANNER === 'icap') {
28 if (defined('IL_ICAP_CLIENT') && IL_ICAP_CLIENT !== '') {
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
39 case 'AntiVir':
40 global $DIC;
41 $DIC->logger()->root()->error('AntiVir is deprecated, please install and use a different virus scanner.');
42 $vs = new ilVirusScannerAntiVir(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
43 break;
44
45 case 'ClamAV':
46 $vs = new ilVirusScannerClamAV(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
47 break;
48 }
49 }
50
51 return $vs;
52 }
global $DIC
Definition: shib_login.php:26

References $DIC.

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

+ Here is the caller graph for this function:

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