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