]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/Location.php
Add user edit 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 * Constructor
76 */
77 public function __construct() {
78 $this->sessions = new \Doctrine\Common\Collections\ArrayCollection();
79 $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
80 }
81
82 /**
83 * Get id
84 *
85 * @return integer
86 */
87 public function getId() {
88 return $this->id;
89 }
90
91 /**
92 * Set title
93 *
94 * @param string $title
95 *
96 * @return Location
97 */
98 public function setTitle($title) {
99 $this->title = $title;
100
101 return $this;
102 }
103
104 /**
105 * Get title
106 *
107 * @return string
108 */
109 public function getTitle() {
110 return $this->title;
111 }
112
113 /**
114 * Set short
115 *
116 * @param string $short
117 *
118 * @return Location
119 */
120 public function setShort($short) {
121 $this->short = $short;
122
123 return $this;
124 }
125
126 /**
127 * Get short
128 *
129 * @return string
130 */
131 public function getShort() {
132 return $this->short;
133 }
134
135 /**
136 * Set address
137 *
138 * @param string $address
139 *
140 * @return Location
141 */
142 public function setAddress($address) {
143 $this->address = $address;
144
145 return $this;
146 }
147
148 /**
149 * Get address
150 *
151 * @return string
152 */
153 public function getAddress() {
154 return $this->address;
155 }
156
157 /**
158 * Set zipcode
159 *
160 * @param string $zipcode
161 *
162 * @return Location
163 */
164 public function setZipcode($zipcode) {
165 $this->zipcode = $zipcode;
166
167 return $this;
168 }
169
170 /**
171 * Get zipcode
172 *
173 * @return string
174 */
175 public function getZipcode() {
176 return $this->zipcode;
177 }
178
179 /**
180 * Set city
181 *
182 * @param string $city
183 *
184 * @return Location
185 */
186 public function setCity($city) {
187 $this->city = $city;
188
189 return $this;
190 }
191
192 /**
193 * Get city
194 *
195 * @return string
196 */
197 public function getCity() {
198 return $this->city;
199 }
200
201 /**
202 * Set latitude
203 *
204 * @param string $latitude
205 *
206 * @return Location
207 */
208 public function setLatitude($latitude) {
209 $this->latitude = $latitude;
210
211 return $this;
212 }
213
214 /**
215 * Get latitude
216 *
217 * @return string
218 */
219 public function getLatitude() {
220 return $this->latitude;
221 }
222
223 /**
224 * Set longitude
225 *
226 * @param string $longitude
227 *
228 * @return Location
229 */
230 public function setLongitude($longitude) {
231 $this->longitude = $longitude;
232
233 return $this;
234 }
235
236 /**
237 * Get longitude
238 *
239 * @return string
240 */
241 public function getLongitude() {
242 return $this->longitude;
243 }
244
245 /**
246 * Set hotspot
247 *
248 * @param boolean $hotspot
249 *
250 * @return Session
251 */
252 public function setHotspot($hotspot) {
253 $this->hotspot = $hotspot;
254
255 return $this;
256 }
257
258 /**
259 * Get hotspot
260 *
261 * @return boolean
262 */
263 public function getHotspot() {
264 return $this->hotspot;
265 }
266
267 /**
268 * Set created
269 *
270 * @param \DateTime $created
271 *
272 * @return Location
273 */
274 public function setCreated($created) {
275 $this->created = $created;
276
277 return $this;
278 }
279
280 /**
281 * Get created
282 *
283 * @return \DateTime
284 */
285 public function getCreated() {
286 return $this->created;
287 }
288
289 /**
290 * Set updated
291 *
292 * @param \DateTime $updated
293 *
294 * @return Location
295 */
296 public function setUpdated($updated) {
297 $this->updated = $updated;
298
299 return $this;
300 }
301
302 /**
303 * Get updated
304 *
305 * @return \DateTime
306 */
307 public function getUpdated() {
308 return $this->updated;
309 }
310
311 /**
312 * Add session
313 *
314 * @param \Rapsys\AirBundle\Entity\Session $session
315 *
316 * @return Location
317 */
318 public function addSession(\Rapsys\AirBundle\Entity\Session $session) {
319 $this->sessions[] = $session;
320
321 return $this;
322 }
323
324 /**
325 * Remove session
326 *
327 * @param \Rapsys\AirBundle\Entity\Session $session
328 */
329 public function removeSession(\Rapsys\AirBundle\Entity\Session $session) {
330 $this->sessions->removeElement($session);
331 }
332
333 /**
334 * Get sessions
335 *
336 * @return \Doctrine\Common\Collections\Collection
337 */
338 public function getSessions() {
339 return $this->sessions;
340 }
341
342 /**
343 * Add snippet
344 *
345 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
346 *
347 * @return Location
348 */
349 public function addSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
350 $this->snippets[] = $snippet;
351
352 return $this;
353 }
354
355 /**
356 * Remove snippet
357 *
358 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
359 */
360 public function removeSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) {
361 $this->snippets->removeElement($snippet);
362 }
363
364 /**
365 * Get snippets
366 *
367 * @return \Doctrine\Common\Collections\Collection
368 */
369 public function getSnippets() {
370 return $this->snippets;
371 }
372
373 /**
374 * Returns a string representation of the location
375 *
376 * @return string
377 */
378 public function __toString(): string {
379 return $this->title;
380 }
381 }