1 | <?php namespace Arcanedev\GeoLocation\Google\DistanceMatrix; |
||
12 | class DistanceMatrixResponse extends AbstractResponse |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Getters & Setters |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * Get the first origin address. |
||
21 | * |
||
22 | * @return string|null |
||
23 | */ |
||
24 | public function getOriginAddress() |
||
28 | |||
29 | /** |
||
30 | * Get the original addresses. |
||
31 | * |
||
32 | 39 | * @return array |
|
33 | */ |
||
34 | 39 | public function getOriginAddresses() |
|
38 | |||
39 | /** |
||
40 | * Get the first destination address. |
||
41 | * |
||
42 | * @return string|null |
||
43 | */ |
||
44 | public function getDestinationAddress() |
||
48 | |||
49 | 36 | /** |
|
50 | * Get the destination addresses. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | public function getDestinationAddresses() |
||
58 | |||
59 | /** |
||
60 | 33 | * Get the distance (text or value). |
|
61 | * |
||
62 | 33 | * @param bool $text |
|
63 | * |
||
64 | * @return string|int |
||
65 | */ |
||
66 | public function getDistance($text = true) |
||
70 | 15 | ||
71 | /** |
||
72 | 15 | * Get the duration (text or value). |
|
73 | * |
||
74 | * @param bool $text |
||
75 | * |
||
76 | * @return string|int |
||
77 | */ |
||
78 | public function getDuration($text = true) |
||
82 | 15 | ||
83 | /* ----------------------------------------------------------------- |
||
84 | | Main Methods |
||
85 | | ----------------------------------------------------------------- |
||
86 | */ |
||
87 | |||
88 | /** |
||
89 | * Convert the object to array. |
||
90 | 15 | * |
|
91 | * @return array |
||
92 | 15 | */ |
|
93 | public function toArray() |
||
108 | } |
||
109 |