ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilVirusScannerFactory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
12  static public function _getInstance()
13  {
14  $vs = null;
15 
16  if (IL_VIRUS_SCANNER == "icap") {
17  if (strlen(IL_ICAP_CLIENT) > 0) {
18  $vs = new ilVirusScannerICapClient('', '');
19  } else {
20  $vs = new ilVirusScannerICapRemoteAvClient('', '');
21  }
22  } else {
23  switch (IL_VIRUS_SCANNER) {
24  case "Sophos":
25  $vs = new ilVirusScannerSophos(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
26  break;
27  case "AntiVir":
28  global $DIC;
29  $DIC->logger()->error('AntiVir is deprecated, please install and use a different virus scanner.');
30  $vs = new ilVirusScannerAntiVir(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
31  break;
32  case "ClamAV":
33  $vs = new ilVirusScannerClamAV(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
34  break;
35  }
36  }
37  return $vs;
38  }
39 }
Interface to the AntiVir virus protector.
Interface to the ClamAV virus protector.
Class ilVirusScannerFactory.
global $DIC
Definition: goto.php:24
Interface to the ClamAV virus protector.
Interface to the sophos virus protector.