ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
10 {
14  public static function _getInstance()
15  {
16  // create global virus scanner class instance
17  switch (IL_VIRUS_SCANNER) {
18  case "Sophos":
19  require_once("./Services/VirusScanner/classes/class.ilVirusScannerSophos.php");
20  $vs = new ilVirusScannerSophos(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
21  return $vs;
22  break;
23 
24  case "AntiVir":
25  require_once("./Services/VirusScanner/classes/class.ilVirusScannerAntiVir.php");
26  $vs = new ilVirusScannerAntiVir(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
27  return $vs;
28  break;
29 
30  case "ClamAV":
31  require_once("./Services/VirusScanner/classes/class.ilVirusScannerClamAV.php");
32  $vs = new ilVirusScannerClamAV(IL_VIRUS_SCAN_COMMAND, IL_VIRUS_CLEAN_COMMAND);
33  return $vs;
34  break;
35 
36  default:
37  return null;
38  break;
39  }
40  }
41 }
Interface to the AntiVir virus protector.
Factory for virus scanner class(es)
Interface to the ClamAV virus protector.
Interface to the sophos virus protector.