1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Arthem\GoogleApi\Domain\Place; |
4
|
|
|
|
5
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\AddressComponentCollection; |
6
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\FormattedAddress; |
7
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\FormattedPhoneNumber; |
8
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Icon; |
9
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\InternationalPhoneNumber; |
10
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Location; |
11
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Photo; |
12
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\PhotoCollection; |
13
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\PlaceId; |
14
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\PlaceName; |
15
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\TypeCollection; |
16
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Url; |
17
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Vicinity; |
18
|
|
|
use Arthem\GoogleApi\Domain\Place\VO\Website; |
19
|
|
|
|
20
|
|
|
class Place |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* @var PlaceId |
24
|
|
|
*/ |
25
|
|
|
private $id; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var PlaceName |
29
|
|
|
*/ |
30
|
|
|
private $name; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var Vicinity |
34
|
|
|
*/ |
35
|
|
|
private $vicinity; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var FormattedAddress |
39
|
|
|
*/ |
40
|
|
|
private $formattedAddress; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var FormattedPhoneNumber |
44
|
|
|
*/ |
45
|
|
|
private $formattedPhoneNumber; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var Icon |
49
|
|
|
*/ |
50
|
|
|
private $icon; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @var InternationalPhoneNumber |
54
|
|
|
*/ |
55
|
|
|
private $internationalPhoneNumber; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var Website |
59
|
|
|
*/ |
60
|
|
|
private $website; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var Url |
64
|
|
|
*/ |
65
|
|
|
private $url; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var Location |
69
|
|
|
*/ |
70
|
|
|
private $location; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @var TypeCollection |
74
|
|
|
*/ |
75
|
|
|
private $types; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @var AddressComponentCollection |
79
|
|
|
*/ |
80
|
|
|
private $addressComponents; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @var PhotoCollection |
84
|
|
|
*/ |
85
|
|
|
private $photos; |
86
|
|
|
|
87
|
|
|
public function __construct() |
88
|
|
|
{ |
89
|
|
|
$this->types = new TypeCollection(); |
90
|
|
|
$this->addressComponents = new AddressComponentCollection(); |
91
|
|
|
$this->photos = new PhotoCollection(); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return PlaceId |
96
|
|
|
*/ |
97
|
|
|
public function getId() |
98
|
|
|
{ |
99
|
|
|
return $this->id; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @param PlaceId $id |
104
|
|
|
* |
105
|
|
|
* @return $this |
106
|
|
|
*/ |
107
|
|
|
public function setId(PlaceId $id) |
108
|
|
|
{ |
109
|
|
|
$this->id = $id; |
110
|
|
|
|
111
|
|
|
return $this; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return PlaceName |
116
|
|
|
*/ |
117
|
|
|
public function getName() |
118
|
|
|
{ |
119
|
|
|
return $this->name; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param PlaceName $name |
124
|
|
|
* |
125
|
|
|
* @return $this |
126
|
|
|
*/ |
127
|
|
|
public function setName(PlaceName $name) |
128
|
|
|
{ |
129
|
|
|
$this->name = $name; |
130
|
|
|
|
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return Vicinity |
136
|
|
|
*/ |
137
|
|
|
public function getVicinity() |
138
|
|
|
{ |
139
|
|
|
return $this->vicinity; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param Vicinity $vicinity |
144
|
|
|
* |
145
|
|
|
* @return $this |
146
|
|
|
*/ |
147
|
|
|
public function setVicinity(Vicinity $vicinity = null) |
148
|
|
|
{ |
149
|
|
|
$this->vicinity = $vicinity; |
150
|
|
|
|
151
|
|
|
return $this; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @return Location |
156
|
|
|
*/ |
157
|
|
|
public function getLocation() |
158
|
|
|
{ |
159
|
|
|
return $this->location; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* @param Location $location |
164
|
|
|
* |
165
|
|
|
* @return $this |
166
|
|
|
*/ |
167
|
|
|
public function setLocation(Location $location = null) |
168
|
|
|
{ |
169
|
|
|
$this->location = $location; |
170
|
|
|
|
171
|
|
|
return $this; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @return TypeCollection |
176
|
|
|
*/ |
177
|
|
|
public function getTypes() |
178
|
|
|
{ |
179
|
|
|
return $this->types; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* @param TypeCollection $types |
184
|
|
|
* |
185
|
|
|
* @return $this |
186
|
|
|
*/ |
187
|
|
|
public function setTypes(TypeCollection $types) |
188
|
|
|
{ |
189
|
|
|
$this->types = $types; |
190
|
|
|
|
191
|
|
|
return $this; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @return FormattedAddress |
196
|
|
|
*/ |
197
|
|
|
public function getFormattedAddress() |
198
|
|
|
{ |
199
|
|
|
return $this->formattedAddress; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @param FormattedAddress $formattedAddress |
204
|
|
|
* |
205
|
|
|
* @return $this |
206
|
|
|
*/ |
207
|
|
|
public function setFormattedAddress(FormattedAddress $formattedAddress = null) |
208
|
|
|
{ |
209
|
|
|
$this->formattedAddress = $formattedAddress; |
210
|
|
|
|
211
|
|
|
return $this; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @return FormattedPhoneNumber |
216
|
|
|
*/ |
217
|
|
|
public function getFormattedPhoneNumber() |
218
|
|
|
{ |
219
|
|
|
return $this->formattedPhoneNumber; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* @param FormattedPhoneNumber $formattedPhoneNumber |
224
|
|
|
* |
225
|
|
|
* @return $this |
226
|
|
|
*/ |
227
|
|
|
public function setFormattedPhoneNumber(FormattedPhoneNumber $formattedPhoneNumber = null) |
228
|
|
|
{ |
229
|
|
|
$this->formattedPhoneNumber = $formattedPhoneNumber; |
230
|
|
|
|
231
|
|
|
return $this; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* @return Icon |
236
|
|
|
*/ |
237
|
|
|
public function getIcon() |
238
|
|
|
{ |
239
|
|
|
return $this->icon; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* @param Icon $icon |
244
|
|
|
* |
245
|
|
|
* @return $this |
246
|
|
|
*/ |
247
|
|
|
public function setIcon(Icon $icon = null) |
248
|
|
|
{ |
249
|
|
|
$this->icon = $icon; |
250
|
|
|
|
251
|
|
|
return $this; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* @return InternationalPhoneNumber |
256
|
|
|
*/ |
257
|
|
|
public function getInternationalPhoneNumber() |
258
|
|
|
{ |
259
|
|
|
return $this->internationalPhoneNumber; |
260
|
|
|
} |
261
|
|
|
|
262
|
|
|
/** |
263
|
|
|
* @param InternationalPhoneNumber $internationalPhoneNumber |
264
|
|
|
* |
265
|
|
|
* @return $this |
266
|
|
|
*/ |
267
|
|
|
public function setInternationalPhoneNumber(InternationalPhoneNumber $internationalPhoneNumber = null) |
268
|
|
|
{ |
269
|
|
|
$this->internationalPhoneNumber = $internationalPhoneNumber; |
270
|
|
|
|
271
|
|
|
return $this; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* @return Website |
276
|
|
|
*/ |
277
|
|
|
public function getWebsite() |
278
|
|
|
{ |
279
|
|
|
return $this->website; |
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
/** |
283
|
|
|
* @param Website $website |
284
|
|
|
* |
285
|
|
|
* @return $this |
286
|
|
|
*/ |
287
|
|
|
public function setWebsite(Website $website = null) |
288
|
|
|
{ |
289
|
|
|
$this->website = $website; |
290
|
|
|
|
291
|
|
|
return $this; |
292
|
|
|
} |
293
|
|
|
|
294
|
|
|
/** |
295
|
|
|
* @return Url |
296
|
|
|
*/ |
297
|
|
|
public function getUrl() |
298
|
|
|
{ |
299
|
|
|
return $this->url; |
300
|
|
|
} |
301
|
|
|
|
302
|
|
|
/** |
303
|
|
|
* @param Url $url |
304
|
|
|
* |
305
|
|
|
* @return $this |
306
|
|
|
*/ |
307
|
|
|
public function setUrl(Url $url = null) |
308
|
|
|
{ |
309
|
|
|
$this->url = $url; |
310
|
|
|
|
311
|
|
|
return $this; |
312
|
|
|
} |
313
|
|
|
|
314
|
|
|
/** |
315
|
|
|
* @return AddressComponentCollection |
316
|
|
|
*/ |
317
|
|
|
public function getAddressComponents() |
318
|
|
|
{ |
319
|
|
|
return $this->addressComponents; |
320
|
|
|
} |
321
|
|
|
|
322
|
|
|
/** |
323
|
|
|
* @param AddressComponentCollection $addressComponents |
324
|
|
|
* |
325
|
|
|
* @return $this |
326
|
|
|
*/ |
327
|
|
|
public function setAddressComponents(AddressComponentCollection $addressComponents) |
328
|
|
|
{ |
329
|
|
|
$this->addressComponents = $addressComponents; |
330
|
|
|
|
331
|
|
|
return $this; |
332
|
|
|
} |
333
|
|
|
|
334
|
|
|
/** |
335
|
|
|
* @return PhotoCollection|Photo[] |
336
|
|
|
*/ |
337
|
|
|
public function getPhotos() |
338
|
|
|
{ |
339
|
|
|
return $this->photos; |
340
|
|
|
} |
341
|
|
|
|
342
|
|
|
/** |
343
|
|
|
* @param PhotoCollection $photos |
344
|
|
|
* |
345
|
|
|
* @return $this |
346
|
|
|
*/ |
347
|
|
|
public function setPhotos(PhotoCollection $photos) |
348
|
|
|
{ |
349
|
|
|
$this->photos = $photos; |
350
|
|
|
|
351
|
|
|
return $this; |
352
|
|
|
} |
353
|
|
|
} |
354
|
|
|
|