36 self::VIRUS_SCANNER_NONE,
37 self::VIRUS_SCANNER_SOPHOS,
38 self::VIRUS_SCANNER_ANTIVIR,
39 self::VIRUS_SCANNER_CLAMAV
41 if (!in_array($virus_scanner, $scanners)) {
42 throw new \InvalidArgumentException(
43 "Unknown virus scanner: '$virus_scanner'" 46 if ($virus_scanner !== self::VIRUS_SCANNER_NONE && (!$path_to_scan || !$path_to_clean)) {
47 throw new \InvalidArgumentException(
48 "Missing path to scan and/or clean commands for virus scanner." 61 return preg_replace(
"/\\\\/",
"/", $p);
const VIRUS_SCANNER_ANTIVIR
toLinuxConvention(?string $p)
__construct(string $virus_scanner, ?string $path_to_scan, ?string $path_to_clean)
const VIRUS_SCANNER_SOPHOS
const VIRUS_SCANNER_CLAMAV