1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @copyright Copyright (c) 2019 Matthias Held <[email protected]> |
4
|
|
|
* @author Matthias Held <[email protected]> |
5
|
|
|
* @license GNU AGPL version 3 or any later version |
6
|
|
|
* |
7
|
|
|
* This program is free software: you can redistribute it and/or modify |
8
|
|
|
* it under the terms of the GNU Affero General Public License as |
9
|
|
|
* published by the Free Software Foundation, either version 3 of the |
10
|
|
|
* License, or (at your option) any later version. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU Affero General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU Affero General Public License |
18
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace OCA\RansomwareDetection\Model; |
22
|
|
|
|
23
|
|
|
class Detection implements \JsonSerializable { |
24
|
|
|
private $id; |
25
|
|
|
private $fileOperations = array(); |
26
|
|
|
|
27
|
|
|
public function __construct($id, $fileOperations) { |
28
|
|
|
$this->id = $id; |
29
|
|
|
$this->fileOperations = $fileOperations; |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
public function getId() { |
33
|
|
|
return $this->id; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
public function setId($id) { |
37
|
|
|
$this->id = $id; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function getFileOperations() { |
41
|
|
|
return $this->fileOperations; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function setFileOperations($fileOperations) { |
45
|
|
|
$this->fileOperations = $fileOperations; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function addFileOperation($fileOperation) { |
49
|
|
|
array_push($this->fileOperations, $fileOperation); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function jsonSerialize() |
53
|
|
|
{ |
54
|
|
|
return get_object_vars($this); |
55
|
|
|
} |
56
|
|
|
} |