1 | <?php |
||
19 | class ScannerFactory { |
||
20 | // We split it in two parts in order to prevent reports from av scanners |
||
21 | const EICAR_PART_1 = 'X5O!P%@AP[4\PZX54(P^)7CC)7}$'; |
||
22 | const EICAR_PART_2 = 'EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'; |
||
23 | |||
24 | /** |
||
25 | * @var \OCA\Files_Antivirus\AppConfig |
||
26 | */ |
||
27 | protected $appConfig; |
||
28 | |||
29 | /** |
||
30 | * @var ILogger; |
||
31 | */ |
||
32 | protected $logger; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $scannerClass; |
||
38 | |||
39 | 15 | public function __construct(AppConfig $appConfig, ILogger $logger) { |
|
52 | |||
53 | /** |
||
54 | * @throws InitException |
||
55 | */ |
||
56 | 15 | protected function getScannerClass() { |
|
76 | |||
77 | /** |
||
78 | * Produce a scanner instance |
||
79 | * |
||
80 | * @return \OCA\Files_Antivirus\Scanner\AbstractScanner |
||
81 | */ |
||
82 | 8 | public function getScanner() { |
|
85 | |||
86 | /** |
||
87 | * @param AppConfig $appConfig |
||
88 | * |
||
89 | * @return bool |
||
90 | */ |
||
91 | public function testConnection(AppConfig $appConfig) { |
||
104 | } |
||
105 |