1 | <?php |
||
15 | class Status { |
||
16 | |||
17 | /* |
||
18 | * The file was not checked (e.g. because the AV daemon wasn't running). |
||
19 | */ |
||
20 | public const SCANRESULT_UNCHECKED = -1; |
||
21 | |||
22 | /* |
||
23 | * The file was checked and found to be clean. |
||
24 | */ |
||
25 | public const SCANRESULT_CLEAN = 0; |
||
26 | |||
27 | /* |
||
28 | * The file was checked and found to be infected. |
||
29 | */ |
||
30 | public const SCANRESULT_INFECTED = 1; |
||
31 | |||
32 | /* |
||
33 | * Should be SCANRESULT_UNCHECKED | SCANRESULT_INFECTED | SCANRESULT_CLEAN |
||
34 | */ |
||
35 | protected $numericStatus = self::SCANRESULT_UNCHECKED; |
||
36 | |||
37 | /* |
||
38 | * Virus name or error message |
||
39 | */ |
||
40 | protected $details = ''; |
||
41 | |||
42 | /** @var RuleMapper */ |
||
43 | protected $ruleMapper; |
||
44 | |||
45 | /** @var ILogger */ |
||
46 | protected $logger; |
||
47 | |||
48 | /** |
||
49 | * Status constructor. |
||
50 | * |
||
51 | * @param RuleMapper $ruleMapper |
||
52 | * @param ILogger $logger |
||
53 | */ |
||
54 | 1 | public function __construct(RuleMapper $ruleMapper, ILogger $logger) { |
|
58 | |||
59 | /** |
||
60 | * Get scan status as integer |
||
61 | * @return int |
||
62 | */ |
||
63 | 1 | public function getNumericStatus() { |
|
66 | |||
67 | /** |
||
68 | * Get scan status as string |
||
69 | * @return string |
||
70 | */ |
||
71 | 1 | public function getDetails() { |
|
74 | |||
75 | public function setNumericStatus(int $numericStatus): void { |
||
78 | |||
79 | public function setDetails(string $details): void { |
||
82 | |||
83 | /** |
||
84 | * @param string $rawResponse |
||
85 | * @param integer $result |
||
86 | */ |
||
87 | 1 | public function parseResponse($rawResponse, $result = null) { |
|
143 | 1 | ||
144 | /** |
||
145 | * @return Rule[] |
||
146 | */ |
||
147 | protected function getResponseRules() { |
||
159 | |||
160 | public function dispatch(Item $item) { |
||
173 | } |
||
174 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.