1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace DH\DoctrineAuditBundle\Model; |
4
|
|
|
|
5
|
|
|
class Entry |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* @var int |
9
|
|
|
*/ |
10
|
|
|
protected $id; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @var string |
14
|
|
|
*/ |
15
|
|
|
protected $type; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* @var string |
19
|
|
|
*/ |
20
|
|
|
protected $object_id; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var null|string |
24
|
|
|
*/ |
25
|
|
|
protected $discriminator; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var null|string |
29
|
|
|
*/ |
30
|
|
|
protected $transaction_hash; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
*/ |
35
|
|
|
protected $diffs; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var null|int|string |
39
|
|
|
*/ |
40
|
|
|
protected $blame_id; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var string |
44
|
|
|
*/ |
45
|
|
|
protected $blame_user; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string |
49
|
|
|
*/ |
50
|
|
|
protected $blame_user_fqdn; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
protected $blame_user_firewall; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var string |
59
|
|
|
*/ |
60
|
|
|
protected $ip; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var string |
64
|
|
|
*/ |
65
|
|
|
protected $created_at; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @param string $name |
69
|
|
|
* @param null|int|string $value |
70
|
|
|
*/ |
71
|
|
|
public function __set(string $name, $value): void |
72
|
|
|
{ |
73
|
|
|
$this->{$name} = $value; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param string $name |
78
|
|
|
* |
79
|
|
|
* @return null|int|string |
80
|
|
|
*/ |
81
|
|
|
public function __get(string $name) |
82
|
|
|
{ |
83
|
|
|
return $this->{$name}; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
public function __isset(string $name): bool |
87
|
|
|
{ |
88
|
|
|
return property_exists($this, $name); |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Get the value of id. |
93
|
|
|
* |
94
|
|
|
* @return int |
95
|
|
|
*/ |
96
|
|
|
public function getId(): int |
97
|
|
|
{ |
98
|
|
|
return $this->id; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* Get the value of type. |
103
|
|
|
* |
104
|
|
|
* @return string |
105
|
|
|
*/ |
106
|
|
|
public function getType(): string |
107
|
|
|
{ |
108
|
|
|
return $this->type; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* Get the value of object_id. |
113
|
|
|
* |
114
|
|
|
* @return string |
115
|
|
|
*/ |
116
|
|
|
public function getObjectId(): string |
117
|
|
|
{ |
118
|
|
|
return $this->object_id; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* Get the value of discriminator. |
123
|
|
|
* |
124
|
|
|
* @return null|string |
125
|
|
|
*/ |
126
|
|
|
public function getDiscriminator(): ?string |
127
|
|
|
{ |
128
|
|
|
return $this->discriminator; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* Get the value of transaction_hash. |
133
|
|
|
* |
134
|
|
|
* @return null|string |
135
|
|
|
*/ |
136
|
|
|
public function getTransactionHash(): ?string |
137
|
|
|
{ |
138
|
|
|
return $this->transaction_hash; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* Get the value of blame_id. |
143
|
|
|
* |
144
|
|
|
* @return null|int|string |
145
|
|
|
*/ |
146
|
|
|
public function getUserId() |
147
|
|
|
{ |
148
|
|
|
return $this->blame_id; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Get the value of blame_user. |
153
|
|
|
* |
154
|
|
|
* @return null|string |
155
|
|
|
*/ |
156
|
|
|
public function getUsername(): ?string |
157
|
|
|
{ |
158
|
|
|
return $this->blame_user; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @return null|string |
163
|
|
|
*/ |
164
|
|
|
public function getUserFqdn(): ?string |
165
|
|
|
{ |
166
|
|
|
return $this->blame_user_fqdn; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
/** |
170
|
|
|
* @return null|string |
171
|
|
|
*/ |
172
|
|
|
public function getUserFirewall(): ?string |
173
|
|
|
{ |
174
|
|
|
return $this->blame_user_firewall; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* Get the value of ip. |
179
|
|
|
* |
180
|
|
|
* @return string |
181
|
|
|
*/ |
182
|
|
|
public function getIp(): ?string |
183
|
|
|
{ |
184
|
|
|
return $this->ip; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* Get the value of created_at. |
189
|
|
|
* |
190
|
|
|
* @return string |
191
|
|
|
*/ |
192
|
|
|
public function getCreatedAt(): string |
193
|
|
|
{ |
194
|
|
|
return $this->created_at; |
195
|
|
|
} |
196
|
|
|
|
197
|
|
|
/** |
198
|
|
|
* Get the value of created_at. |
199
|
|
|
* |
200
|
|
|
* @return array |
201
|
|
|
*/ |
202
|
|
|
public function getDiffs(): ?array |
203
|
|
|
{ |
204
|
|
|
return json_decode($this->diffs, true); |
205
|
|
|
} |
206
|
|
|
} |
207
|
|
|
|