1 | <?php |
||
8 | class Location implements ObjectableInterface |
||
9 | { |
||
10 | /** |
||
11 | * Mapper instance. |
||
12 | * |
||
13 | * @var Mapper |
||
14 | */ |
||
15 | protected static $mapper; |
||
16 | |||
17 | /** |
||
18 | * Search. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $search; |
||
23 | |||
24 | /** |
||
25 | * Address. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $address; |
||
30 | |||
31 | /** |
||
32 | * Postal Code. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $postalCode; |
||
37 | |||
38 | /** |
||
39 | * Type. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $type; |
||
44 | |||
45 | /** |
||
46 | * Latitude. |
||
47 | * |
||
48 | * @var float |
||
49 | */ |
||
50 | protected $latitude; |
||
51 | |||
52 | /** |
||
53 | * Longitude. |
||
54 | * |
||
55 | * @var float |
||
56 | */ |
||
57 | protected $longitude; |
||
58 | |||
59 | /** |
||
60 | * Place Id. |
||
61 | * |
||
62 | * @var string |
||
63 | */ |
||
64 | protected $placeId; |
||
65 | |||
66 | /** |
||
67 | * Public constructor. |
||
68 | * |
||
69 | * @param array $parameters |
||
70 | */ |
||
71 | public function __construct(array $parameters = []) |
||
82 | |||
83 | /** |
||
84 | * Get the mapper instance. |
||
85 | * |
||
86 | * @return Mapper |
||
87 | */ |
||
88 | protected function getMapper() |
||
92 | |||
93 | /** |
||
94 | * Set the mapper instance. |
||
95 | * |
||
96 | * @param Mapper $mapper |
||
97 | * |
||
98 | * @return void |
||
99 | */ |
||
100 | protected function setMapper(Mapper $mapper) |
||
104 | |||
105 | /** |
||
106 | * Get the locations search. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getSearch() |
||
114 | |||
115 | /** |
||
116 | * Set the locations search. |
||
117 | * |
||
118 | * @param string $search |
||
119 | * |
||
120 | * @return void |
||
121 | */ |
||
122 | protected function setSearch($search) |
||
126 | |||
127 | /** |
||
128 | * Get the locations address. |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getAddress() |
||
136 | |||
137 | /** |
||
138 | * Set the locations address. |
||
139 | * |
||
140 | * @param string $address |
||
141 | * |
||
142 | * @return void |
||
143 | */ |
||
144 | protected function setAddress($address) |
||
148 | |||
149 | /** |
||
150 | * Get the locations postal code. |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getPostalCode() |
||
158 | |||
159 | /** |
||
160 | * Set the locations postal code. |
||
161 | * |
||
162 | * @param string $postalCode |
||
163 | * |
||
164 | * @return void |
||
165 | */ |
||
166 | protected function setPostalCode($postalCode) |
||
170 | |||
171 | /** |
||
172 | * Get the locations type. |
||
173 | * |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getType() |
||
180 | |||
181 | /** |
||
182 | * Set the locations type. |
||
183 | * |
||
184 | * @param string $type |
||
185 | * |
||
186 | * @return void |
||
187 | */ |
||
188 | protected function setType($type) |
||
192 | |||
193 | /** |
||
194 | * Get the locations latitude. |
||
195 | * |
||
196 | * @return float |
||
197 | */ |
||
198 | public function getLatitude() |
||
202 | |||
203 | /** |
||
204 | * Set the locations latitude. |
||
205 | * |
||
206 | * @param float $latitude |
||
207 | * |
||
208 | * @return void |
||
209 | */ |
||
210 | protected function setLatitude($latitude) |
||
214 | |||
215 | /** |
||
216 | * Get the locations longitude. |
||
217 | * |
||
218 | * @return float |
||
219 | */ |
||
220 | public function getLongitude() |
||
224 | |||
225 | /** |
||
226 | * Set the locations longitude. |
||
227 | * |
||
228 | * @param float $longitude |
||
229 | * |
||
230 | * @return void |
||
231 | */ |
||
232 | protected function setLongitude($longitude) |
||
236 | |||
237 | /** |
||
238 | * Get the place id. |
||
239 | * |
||
240 | * @return string |
||
241 | * |
||
242 | * @return string |
||
243 | */ |
||
244 | public function getPlaceId() |
||
248 | |||
249 | /** |
||
250 | * Set the place id. |
||
251 | * |
||
252 | * @param string $placeId |
||
253 | * |
||
254 | * @return void |
||
255 | */ |
||
256 | protected function setPlaceId($placeId) |
||
260 | |||
261 | /** |
||
262 | * Create a new map from location. |
||
263 | * |
||
264 | * @param array $options |
||
265 | * |
||
266 | * @return Mapper |
||
267 | */ |
||
268 | public function map(array $options = []) |
||
272 | |||
273 | /** |
||
274 | * Create a new street view map from location. |
||
275 | * |
||
276 | * @param int $heading |
||
277 | * @param int $pitch |
||
278 | * @param array $options |
||
279 | * |
||
280 | * @return Mapper |
||
281 | */ |
||
282 | public function streetview($heading, $pitch, array $options = []) |
||
286 | } |
||
287 |