1 | <?php |
||
26 | class Incident implements IncidentInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var array |
||
30 | * @Exclude |
||
31 | */ |
||
32 | private $observers = array(); |
||
33 | |||
34 | /** |
||
35 | * @Id |
||
36 | * @Exclude |
||
37 | * @Column(type="integer") |
||
38 | * @GeneratedValue(strategy="IDENTITY") |
||
39 | */ |
||
40 | private $id = null; |
||
41 | |||
42 | /** |
||
43 | * @Column(type="integer", nullable=true) |
||
44 | */ |
||
45 | private $external_id = null; |
||
46 | |||
47 | /** |
||
48 | * @Column(type="string", length=128, unique=true) |
||
49 | * @Expose |
||
50 | */ |
||
51 | private $ident; |
||
52 | |||
53 | /** |
||
54 | * Type of the problems (urgent, warning, minor) |
||
55 | * |
||
56 | * @Column(type="string", length=32, name="`type`", nullable=true) |
||
57 | * @Expose |
||
58 | * @Type("string") |
||
59 | */ |
||
60 | private $type = self::TYPE_URGENT; |
||
61 | |||
62 | /** |
||
63 | * @Column(type="string", length=128) |
||
64 | * @Expose |
||
65 | * @Type("string") |
||
66 | */ |
||
67 | private $name; |
||
68 | |||
69 | /** |
||
70 | * @Column(type="text") |
||
71 | * @Expose |
||
72 | * @Type("string") |
||
73 | */ |
||
74 | private $message; |
||
75 | |||
76 | /** |
||
77 | * @Column(type="integer", nullable=true) |
||
78 | * @Expose |
||
79 | * @Type("integer") |
||
80 | */ |
||
81 | private $status = null; |
||
82 | |||
83 | /** |
||
84 | * Incident constructor. |
||
85 | * |
||
86 | * @param string $ident |
||
87 | * @param string $name |
||
88 | */ |
||
89 | 1 | public function __construct($ident, $name = '') |
|
94 | |||
95 | /** |
||
96 | * Attach an SplObserver |
||
97 | * |
||
98 | * @link http://php.net/manual/en/splsubject.attach.php |
||
99 | * |
||
100 | * @param SplObserver $observer <p> |
||
101 | * The <b>SplObserver</b> to attach. |
||
102 | * </p> |
||
103 | * |
||
104 | * @return void |
||
105 | * |
||
106 | * @since 5.1.0 |
||
107 | */ |
||
108 | 4 | public function attach(SplObserver $observer) |
|
112 | |||
113 | /** |
||
114 | * Detach an observer |
||
115 | * |
||
116 | * @link http://php.net/manual/en/splsubject.detach.php |
||
117 | * |
||
118 | * @param SplObserver $observer <p> |
||
119 | * The <b>SplObserver</b> to detach. |
||
120 | * </p> |
||
121 | * |
||
122 | * @return void |
||
123 | * |
||
124 | * @since 5.1.0 |
||
125 | */ |
||
126 | public function detach(SplObserver $observer) |
||
134 | |||
135 | /** |
||
136 | * Notify an observer |
||
137 | * |
||
138 | * @link http://php.net/manual/en/splsubject.notify.php |
||
139 | * |
||
140 | * @return void |
||
141 | * |
||
142 | * @since 5.1.0 |
||
143 | */ |
||
144 | 4 | public function notify() |
|
151 | |||
152 | /** |
||
153 | * Set id |
||
154 | * |
||
155 | * @param int $id |
||
156 | * |
||
157 | * @return Incident |
||
158 | */ |
||
159 | 1 | public function setId($id) |
|
165 | |||
166 | /** |
||
167 | * Get id |
||
168 | * |
||
169 | * @return int |
||
170 | */ |
||
171 | 4 | public function getId() |
|
175 | |||
176 | /** |
||
177 | * Set ident |
||
178 | * |
||
179 | * @param string $ident |
||
180 | * |
||
181 | * @return Incident |
||
182 | */ |
||
183 | 1 | public function setIdent($ident) |
|
189 | |||
190 | /** |
||
191 | * Get ident |
||
192 | * |
||
193 | * @return string |
||
194 | */ |
||
195 | public function getIdent() |
||
199 | |||
200 | /** |
||
201 | * Get type |
||
202 | * |
||
203 | * @return string |
||
204 | */ |
||
205 | 4 | public function getType() |
|
209 | |||
210 | /** |
||
211 | * Set type |
||
212 | * |
||
213 | * @param string $type |
||
214 | */ |
||
215 | public function setType($type) |
||
219 | |||
220 | /** |
||
221 | * Set name |
||
222 | * |
||
223 | * @param string $name |
||
224 | * |
||
225 | * @return Incident |
||
226 | */ |
||
227 | 1 | public function setName($name) |
|
233 | |||
234 | /** |
||
235 | * Get name |
||
236 | * |
||
237 | * @return string |
||
238 | */ |
||
239 | public function getName() |
||
243 | |||
244 | /** |
||
245 | * Set message |
||
246 | * |
||
247 | * @param string $message |
||
248 | * |
||
249 | * @return Incident |
||
250 | */ |
||
251 | 1 | public function setMessage($message) |
|
257 | |||
258 | /** |
||
259 | * Get message |
||
260 | * |
||
261 | * @return string |
||
262 | */ |
||
263 | public function getMessage() |
||
267 | |||
268 | /** |
||
269 | * Set status |
||
270 | * |
||
271 | * @param int $status |
||
272 | * |
||
273 | * @return Incident |
||
274 | */ |
||
275 | 1 | public function setStatus($status) |
|
281 | |||
282 | /** |
||
283 | * Get status |
||
284 | * |
||
285 | * @return int |
||
286 | */ |
||
287 | public function getStatus() |
||
291 | |||
292 | /** |
||
293 | * Set externalId |
||
294 | * |
||
295 | * @param int $externalId |
||
296 | * |
||
297 | * @return Incident |
||
298 | */ |
||
299 | public function setExternalId($externalId) |
||
305 | |||
306 | /** |
||
307 | * Get externalId |
||
308 | * |
||
309 | * @return int |
||
310 | */ |
||
311 | public function getExternalId() |
||
315 | } |
||
316 |