1 | <?php |
||
20 | class CQuizAnswer |
||
21 | { |
||
22 | /** |
||
23 | * @var integer |
||
24 | * |
||
25 | * @ORM\Column(name="iid", type="integer", options={"unsigned": true}) |
||
26 | * @ORM\Id |
||
27 | * @ORM\GeneratedValue |
||
28 | */ |
||
29 | private $iid; |
||
30 | |||
31 | /** |
||
32 | * @var integer |
||
33 | * |
||
34 | * @ORM\Column(name="id_auto", type="integer", options={"unsigned": true, "default": null}) |
||
35 | */ |
||
36 | private $idAuto; |
||
37 | |||
38 | /** |
||
39 | * @var integer |
||
40 | * |
||
41 | * @ORM\Column(name="c_id", type="integer", options={"unsigned": true, "default": null}) |
||
42 | */ |
||
43 | private $cId; |
||
44 | |||
45 | /** |
||
46 | * @var integer |
||
47 | * |
||
48 | * @ORM\Column(name="id", type="integer", nullable=true) |
||
49 | */ |
||
50 | private $id; |
||
51 | |||
52 | /** |
||
53 | * @var integer |
||
54 | * |
||
55 | * @ORM\Column(name="question_id", type="integer", nullable=false) |
||
56 | */ |
||
57 | private $questionId; |
||
58 | |||
59 | /** |
||
60 | * @var string |
||
61 | * |
||
62 | * @ORM\Column(name="answer", type="text", nullable=false) |
||
63 | */ |
||
64 | private $answer; |
||
65 | |||
66 | /** |
||
67 | * @var integer |
||
68 | * |
||
69 | * @ORM\Column(name="correct", type="integer", nullable=true) |
||
70 | */ |
||
71 | private $correct; |
||
72 | |||
73 | /** |
||
74 | * @var string |
||
75 | * |
||
76 | * @ORM\Column(name="comment", type="text", nullable=true) |
||
77 | */ |
||
78 | private $comment; |
||
79 | |||
80 | /** |
||
81 | * @var float |
||
82 | * |
||
83 | * @ORM\Column(name="ponderation", type="float", precision=6, scale=2, nullable=false) |
||
84 | */ |
||
85 | private $ponderation; |
||
86 | |||
87 | /** |
||
88 | * @var integer |
||
89 | * |
||
90 | * @ORM\Column(name="position", type="integer", nullable=false) |
||
91 | */ |
||
92 | private $position; |
||
93 | |||
94 | /** |
||
95 | * @var string |
||
96 | * |
||
97 | * @ORM\Column(name="hotspot_coordinates", type="text", nullable=true) |
||
98 | */ |
||
99 | private $hotspotCoordinates; |
||
100 | |||
101 | /** |
||
102 | * @var string |
||
103 | * |
||
104 | * @ORM\Column(name="hotspot_type", type="string", length=40, nullable=true) |
||
105 | */ |
||
106 | private $hotspotType; |
||
107 | |||
108 | /** |
||
109 | * @var string |
||
110 | * |
||
111 | * @ORM\Column(name="destination", type="text", nullable=false) |
||
112 | */ |
||
113 | private $destination; |
||
114 | |||
115 | /** |
||
116 | * @var string |
||
117 | * |
||
118 | * @ORM\Column(name="answer_code", type="string", length=10, nullable=true) |
||
119 | */ |
||
120 | private $answerCode; |
||
121 | |||
122 | public function __construct() |
||
123 | { |
||
124 | $this->id = null; |
||
125 | $this->idAuto = 0; |
||
126 | $this->correct = null; |
||
127 | $this->comment = null; |
||
128 | $this->ponderation = 0; |
||
|
|||
129 | $this->hotspotCoordinates = null; |
||
130 | $this->hotspotType = null; |
||
131 | $this->destination = ''; |
||
132 | $this->answerCode = null; |
||
133 | } |
||
134 | |||
135 | /** |
||
136 | * Set id |
||
137 | * |
||
138 | * @param integer $id |
||
139 | * @return CQuizAnswer |
||
140 | */ |
||
141 | public function setId($id) |
||
147 | |||
148 | /** |
||
149 | * Get id |
||
150 | * |
||
151 | * @return integer |
||
152 | */ |
||
153 | public function getId() |
||
157 | |||
158 | /** |
||
159 | * Set questionId |
||
160 | * |
||
161 | * @param integer $questionId |
||
162 | * @return CQuizAnswer |
||
163 | */ |
||
164 | public function setQuestionId($questionId) |
||
170 | |||
171 | /** |
||
172 | * Get questionId |
||
173 | * |
||
174 | * @return integer |
||
175 | */ |
||
176 | public function getQuestionId() |
||
180 | |||
181 | /** |
||
182 | * Set answer |
||
183 | * |
||
184 | * @param string $answer |
||
185 | * @return CQuizAnswer |
||
186 | */ |
||
187 | public function setAnswer($answer) |
||
193 | |||
194 | /** |
||
195 | * Get answer |
||
196 | * |
||
197 | * @return string |
||
198 | */ |
||
199 | public function getAnswer() |
||
203 | |||
204 | /** |
||
205 | * Set correct |
||
206 | * |
||
207 | * @param integer $correct |
||
208 | * @return CQuizAnswer |
||
209 | */ |
||
210 | public function setCorrect($correct) |
||
216 | |||
217 | /** |
||
218 | * Get correct |
||
219 | * |
||
220 | * @return integer |
||
221 | */ |
||
222 | public function getCorrect() |
||
226 | |||
227 | /** |
||
228 | * Set comment |
||
229 | * |
||
230 | * @param string $comment |
||
231 | * @return CQuizAnswer |
||
232 | */ |
||
233 | public function setComment($comment) |
||
239 | |||
240 | /** |
||
241 | * Get comment |
||
242 | * |
||
243 | * @return string |
||
244 | */ |
||
245 | public function getComment() |
||
249 | |||
250 | /** |
||
251 | * Set ponderation |
||
252 | * |
||
253 | * @param float $ponderation |
||
254 | * @return CQuizAnswer |
||
255 | */ |
||
256 | public function setPonderation($ponderation) |
||
257 | { |
||
258 | $this->ponderation = $ponderation; |
||
259 | |||
260 | return $this; |
||
261 | } |
||
262 | |||
263 | /** |
||
264 | * Get ponderation |
||
265 | * |
||
266 | * @return float |
||
267 | */ |
||
268 | public function getPonderation() |
||
272 | |||
273 | /** |
||
274 | * Set position |
||
275 | * |
||
276 | * @param integer $position |
||
277 | * @return CQuizAnswer |
||
278 | */ |
||
279 | public function setPosition($position) |
||
285 | |||
286 | /** |
||
287 | * Get position |
||
288 | * |
||
289 | * @return integer |
||
290 | */ |
||
291 | public function getPosition() |
||
295 | |||
296 | /** |
||
297 | * Set hotspotCoordinates |
||
298 | * |
||
299 | * @param string $hotspotCoordinates |
||
300 | * @return CQuizAnswer |
||
301 | */ |
||
302 | public function setHotspotCoordinates($hotspotCoordinates) |
||
308 | |||
309 | /** |
||
310 | * Get hotspotCoordinates |
||
311 | * |
||
312 | * @return string |
||
313 | */ |
||
314 | public function getHotspotCoordinates() |
||
318 | |||
319 | /** |
||
320 | * Set hotspotType |
||
321 | * |
||
322 | * @param string $hotspotType |
||
323 | * @return CQuizAnswer |
||
324 | */ |
||
325 | public function setHotspotType($hotspotType) |
||
331 | |||
332 | /** |
||
333 | * Get hotspotType |
||
334 | * |
||
335 | * @return string |
||
336 | */ |
||
337 | public function getHotspotType() |
||
341 | |||
342 | /** |
||
343 | * Set destination |
||
344 | * |
||
345 | * @param string $destination |
||
346 | * @return CQuizAnswer |
||
347 | */ |
||
348 | public function setDestination($destination) |
||
349 | { |
||
350 | $this->destination = $destination; |
||
351 | |||
352 | return $this; |
||
353 | } |
||
354 | |||
355 | /** |
||
356 | * Get destination |
||
357 | * |
||
358 | * @return string |
||
359 | */ |
||
360 | public function getDestination() |
||
364 | |||
365 | /** |
||
366 | * Set answerCode |
||
367 | * |
||
368 | * @param string $answerCode |
||
369 | * @return CQuizAnswer |
||
370 | */ |
||
371 | public function setAnswerCode($answerCode) |
||
377 | |||
378 | /** |
||
379 | * Get answerCode |
||
380 | * |
||
381 | * @return string |
||
382 | */ |
||
383 | public function getAnswerCode() |
||
387 | |||
388 | /** |
||
389 | * Set idAuto |
||
390 | * |
||
391 | * @param integer $idAuto |
||
392 | * @return CQuizAnswer |
||
393 | */ |
||
394 | public function setIdAuto($idAuto) |
||
400 | |||
401 | /** |
||
402 | * Get idAuto |
||
403 | * |
||
404 | * @return integer |
||
405 | */ |
||
406 | public function getIdAuto() |
||
410 | |||
411 | /** |
||
412 | * Set cId |
||
413 | * |
||
414 | * @param integer $cId |
||
415 | * @return CQuizAnswer |
||
416 | */ |
||
417 | public function setCId($cId) |
||
423 | |||
424 | /** |
||
425 | * Get cId |
||
426 | * |
||
427 | * @return integer |
||
428 | */ |
||
429 | public function getCId() |
||
433 | |||
434 | /** |
||
435 | * Get iid |
||
436 | * @return int |
||
437 | */ |
||
438 | public function getIid() |
||
442 | } |
||
443 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.