]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/Location.php
Add register before login form
[airbundle] / Entity / Location.php
1 <?php
2
3 namespace Rapsys\AirBundle\Entity;
4
5 /**
6 * Location
7 */
8 class Location {
9 /**
10 * @var integer
11 */
12 private $id;
13
14 /**
15 * @var string
16 */
17 private $title;
18
19 /**
20 * @var string
21 */
22 private $short;
23
24 /**
25 * @var string
26 */
27 private $address;
28
29 /**
30 * @var string
31 */
32 private $zipcode;
33
34 /**
35 * @var string
36 */
37 private $city;
38
39 /**
40 * @var string
41 */
42 private $latitude;
43
44 /**
45 * @var string
46 */
47 private $longitude;
48
49 /**
50 * @var boolean
51 */
52 private $hotspot;
53
54 /**
55 * @var \DateTime
56 */
57 private $created;
58
59 /**
60 * @var \DateTime
61 */
62 private $updated;
63
64 /**
65 * @var \Doctrine\Common\Collections\Collection
66 */
67 private $sessions;
68
69 /**
70 * @var \Doctrine\Common\Collections\Collection
71 */
72 private $snippets;
73
74 /**
75 * @var \Doctrine\Common\Collections\Collection
76 */
77 private $users;
78
79 /**
80 * Constructor
81 */
82 public function __construct() {
83 $this->sessions = new \Doctrine\Common\Collections\ArrayCollection();
84 $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
85 $this->users = new \Doctrine\Common\Collections\ArrayCollection();
86 }
87
88 /**
89 * Get id
90 *
91 * @return integer
92 */
93 public function getId() {
94 return $this->id;
95 }
96
97 /**
98 * Set title
99 *
100 * @param string $title
101 *
102 * @return Location
103 */
104 public function setTitle($title) {
105 $this->title = $title;
106
107 return $this;
108 }
109
110 /**
111 * Get title
112 *
113 * @return string
114 */
115 public function getTitle() {
116 return $this->title;
117 }
118
119 /**
120 * Set short
121 *
122 * @param string $short
123 *
124 * @return Location
125 */
126 public function setShort($short) {
127 $this->short = $short;
128
129 return $this;
130 }
131
132 /**
133 * Get short
134 *
135 * @return string
136 */
137 public function getShort() {
138 return $this->short;
139 }
140
141 /**
142 * Set address
143 *
144 * @param string $address
145 *
146 * @return Location
147 */
148 public function setAddress($address) {
149 $this->address = $address;
150
151 return $this;
152 }
153
154 /**
155 * Get address
156 *
157 * @return string
158 */
159 public function getAddress() {
160 return $this->address;
161 }
162
163 /**
164 * Set zipcode
165 *
166 * @param string $zipcode
167 *
168 * @return Location
169 */
170 public function setZipcode($zipcode) {
171 $this->zipcode = $zipcode;
172
173 return $this;
174 }
175
176 /**
177 * Get zipcode
178 *
179 * @return string
180 */
181 public function getZipcode() {
182 return $this->zipcode;
183 }
184
185 /**
186 * Set city
187 *
188 * @param string $city
189 *
190 * @return Location
191 */
192 public function setCity($city) {
193 $this->city = $city;
194
195 return $this;
196 }
197
198 /**
199 * Get city
200 *
201 * @return string
202 */
203 public function getCity() {
204 return $this->city;
205 }
206
207 /**
208 * Set latitude
209 *
210 * @param string $latitude
211 *
212 * @return Location
213 */
214 public function setLatitude($latitude) {
215 $this->latitude = $latitude;
216
217 return $this;
218 }
219
220 /**
221 * Get latitude
222 *
223 * @return string
224 */
225 public function getLatitude() {
226 return $this->latitude;
227 }
228
229 /**
230 * Set longitude
231 *
232 * @param string $longitude
233 *
234 * @return Location
235 */
236 public function setLongitude($longitude) {
237 $this->longitude = $longitude;
238
239 return $this;
240 }
241
242 /**
243 * Get longitude
244 *
245 * @return string
246 */
247 public function getLongitude() {
248 return $this->longitude;
249 }
250
251 /**
252 * Set hotspot
253 *
254 * @param boolean $hotspot
255 *
256 * @return Session
257 */
258 public function setHotspot($hotspot) {
259 $this->hotspot = $hotspot;
260
261 return $this;
262 }
263
264 /**
265 * Get hotspot
266 *
267 * @return boolean
268 */
269 public function getHotspot() {
270 return $this->hotspot;
271 }
272
273 /**
274 * Set created
275 *
276 * @param \DateTime $created
277 *
278 * @return Location
279 */
280 public function setCreated($created) {
281 $this->created = $created;
282
283 return $this;
284 }
285
286 /**
287 * Get created
288 *
289 * @return \DateTime
290 */
291 public function getCreated() {
292 return $this->created;
293 }
294
295 /**
296 * Set updated
297 *
298 * @param \DateTime $updated
299 *
300 * @return Location
301 */
302 public function setUpdated($updated) {
303 $this->updated = $updated;
304
305 return $this;
306 }
307
308 /**
309 * Get updated
310 *
311 * @return \DateTime
312 */
313 public function getUpdated() {
314 return $this->updated;
315 }
316
317 /**
318 * Add session
319 *
320 * @param \Rapsys\AirBundle\Entity\Session $session
321 *
322 * @return Location
323 */
324 public function addSession(\Rapsys\AirBundle\Entity\Session $session) {
325 $this->sessions[] = $session;
326
327 return $this;
328 }
329
330 /**
331 * Remove session
332 *
333 * @param \Rapsys\AirBundle\Entity\Session $session
334 */
335 public function removeSession(\Rapsys\AirBundle\Entity\Session $session) {
336 $this->sessions->removeElement($session);
337 }
338
339 /**
340 * Get sessions
341 *
342 * @return \Doctrine\Common\Collections\Collection
343 */
344 public function getSessions() {
345 return $this->sessions;
346 }
347
348 /**
349 * Add snippet
350 *
351 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
352 *
353 * @return Location
354 */
355 public function addSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
356 $this->snippets[] = $snippet;
357
358 return $this;
359 }
360
361 /**
362 * Remove snippet
363 *
364 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
365 */
366 public function removeSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
367 $this->snippets->removeElement($snippet);
368 }
369
370 /**
371 * Get snippets
372 *
373 * @return \Doctrine\Common\Collections\Collection
374 */
375 public function getSnippets() {
376 return $this->snippets;
377 }
378
379 /**
380 * Add user
381 *
382 * @param \Rapsys\AirBundle\Entity\User $user
383 *
384 * @return Location
385 */
386 public function addUser(\Rapsys\AirBundle\Entity\User $user) {
387 $this->users[] = $user;
388
389 return $this;
390 }
391
392 /**
393 * Remove user
394 *
395 * @param \Rapsys\AirBundle\Entity\User $user
396 */
397 public function removeUser(\Rapsys\AirBundle\Entity\User $user) {
398 $this->users->removeElement($user);
399 }
400
401 /**
402 * Get users
403 *
404 * @return \Doctrine\Common\Collections\Collection
405 */
406 public function getUsers() {
407 return $this->users;
408 }
409
410 /**
411 * Returns a string representation of the location
412 *
413 * @return string
414 */
415 public function __toString(): string {
416 return $this->title;
417 }
418 }