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