1 | <?php |
||
20 | class InstantWinOccurrence implements InputFilterAwareInterface, \JsonSerializable |
||
21 | { |
||
22 | protected $inputFilter; |
||
23 | |||
24 | /** |
||
25 | * @ORM\Id |
||
26 | * @ORM\Column(type="integer"); |
||
27 | * @ORM\GeneratedValue(strategy="AUTO") |
||
28 | */ |
||
29 | protected $id; |
||
30 | |||
31 | /** |
||
32 | * @ORM\ManyToOne(targetEntity="InstantWin", inversedBy="occurrences", cascade={"persist","remove"}) |
||
33 | * @ORM\JoinColumn(name="instantwin_id", referencedColumnName="id", onDelete="CASCADE") |
||
34 | */ |
||
35 | protected $instantwin; |
||
36 | |||
37 | /** |
||
38 | * @ORM\Column(type="string") |
||
39 | */ |
||
40 | protected $value; |
||
41 | |||
42 | /** |
||
43 | * @ORM\Column(type="boolean", nullable=true) |
||
44 | */ |
||
45 | protected $active = 1; |
||
46 | |||
47 | /** |
||
48 | * @ORM\Column(type="boolean", nullable=true) |
||
49 | */ |
||
50 | protected $winning = 1; |
||
51 | |||
52 | /** |
||
53 | * @ORM\ManyToOne(targetEntity="PlaygroundUser\Entity\User") |
||
54 | * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") |
||
55 | **/ |
||
56 | protected $user; |
||
57 | |||
58 | /** |
||
59 | * @ORM\OneToOne(targetEntity="Entry") |
||
60 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="CASCADE") |
||
61 | */ |
||
62 | protected $entry; |
||
63 | |||
64 | /** |
||
65 | * @ORM\ManyToOne(targetEntity="Prize") |
||
66 | * @ORM\JoinColumn(name="prize_id", referencedColumnName="id", onDelete="CASCADE") |
||
67 | **/ |
||
68 | protected $prize; |
||
69 | |||
70 | /** |
||
71 | * @ORM\Column(type="datetime", name="created_at") |
||
72 | */ |
||
73 | protected $createdAt; |
||
74 | |||
75 | /** |
||
76 | * @ORM\Column(type="datetime", name="updated_at") |
||
77 | */ |
||
78 | protected $updatedAt; |
||
79 | |||
80 | public function __construct() |
||
84 | |||
85 | /** |
||
86 | * @PrePersist |
||
87 | */ |
||
88 | public function createChrono() |
||
93 | |||
94 | /** |
||
95 | * @PreUpdate |
||
96 | */ |
||
97 | public function updateChrono() |
||
101 | |||
102 | /** |
||
103 | * @return the unknown_type |
||
104 | */ |
||
105 | public function getId() |
||
109 | |||
110 | /** |
||
111 | * @param unknown_type $id |
||
112 | */ |
||
113 | public function setId($id) |
||
119 | |||
120 | /** |
||
121 | * @return the unknown_type |
||
122 | */ |
||
123 | public function getInstantwin() |
||
127 | |||
128 | /** |
||
129 | * @param unknown_type $instantwin |
||
130 | */ |
||
131 | public function setInstantwin($instantwin) |
||
137 | |||
138 | /** |
||
139 | * @return the unknown_type |
||
140 | */ |
||
141 | public function getPrize() |
||
145 | |||
146 | /** |
||
147 | * @param unknown_type $prize |
||
148 | */ |
||
149 | public function setPrize($prize) |
||
155 | |||
156 | /** |
||
157 | * @return string unknown_type |
||
158 | */ |
||
159 | public function getValue() |
||
163 | |||
164 | /** |
||
165 | * @param string $value |
||
166 | */ |
||
167 | public function setValue($value) |
||
173 | |||
174 | /** |
||
175 | * @return integer unknown_type |
||
176 | */ |
||
177 | public function getActive() |
||
181 | |||
182 | /** |
||
183 | * @param integer $active |
||
184 | */ |
||
185 | public function setActive($active) |
||
191 | |||
192 | /** |
||
193 | * @return integer unknown_type |
||
194 | */ |
||
195 | public function getWinning() |
||
199 | |||
200 | /** |
||
201 | * @param boolean $winning |
||
202 | */ |
||
203 | public function setWinning($winning) |
||
209 | |||
210 | /** |
||
211 | * @return the $user |
||
212 | */ |
||
213 | public function getUser() |
||
217 | |||
218 | /** |
||
219 | * @param field_type $user |
||
220 | */ |
||
221 | public function setUser($user) |
||
227 | |||
228 | /** |
||
229 | * @return PlaygroundGame\Entity\Entry |
||
230 | */ |
||
231 | public function getEntry() |
||
235 | |||
236 | /** |
||
237 | * @param PlaygroundGame\Entity\Entry $entry |
||
238 | */ |
||
239 | public function setEntry($entry) |
||
245 | |||
246 | /** |
||
247 | * @return the unknown_type |
||
248 | */ |
||
249 | public function getCreatedAt() |
||
253 | |||
254 | /** |
||
255 | * @param unknown_type $createdAt |
||
256 | */ |
||
257 | public function setCreatedAt($createdAt) |
||
263 | |||
264 | /** |
||
265 | * @return the unknown_type |
||
266 | */ |
||
267 | public function getUpdatedAt() |
||
271 | |||
272 | /** |
||
273 | * @param unknown_type $updatedAt |
||
274 | */ |
||
275 | public function setUpdatedAt($updatedAt) |
||
281 | |||
282 | /** |
||
283 | * Convert the object to an array. |
||
284 | * |
||
285 | * @return array |
||
286 | */ |
||
287 | public function getArrayCopy() |
||
292 | |||
293 | /** |
||
294 | * Convert the object to json. |
||
295 | * |
||
296 | * @return array |
||
297 | */ |
||
298 | public function jsonSerialize() |
||
302 | |||
303 | /** |
||
304 | * Populate from an array. |
||
305 | * |
||
306 | * @param array $data |
||
307 | */ |
||
308 | public function populate($data = array()) |
||
309 | { |
||
310 | $this->value = (isset($data['value']) && $data['value'] !== null) ? $data['value'] : null; |
||
311 | $this->active = (isset($data['active']) && $data['active'] !== null) ? $data['active'] : null; |
||
312 | $this->winning = (isset($data['winning']) && $data['winning'] !== null) ? $data['winning'] : null; |
||
313 | } |
||
314 | |||
315 | public function setInputFilter(InputFilterInterface $inputFilter) |
||
319 | |||
320 | public function getInputFilter() |
||
354 | } |
||
355 |
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.