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