1 | <?php namespace Arcanedev\GeoLocation\Google\Elevation\Entities; |
||
16 | class Elevation implements Arrayable, Jsonable, JsonSerializable |
||
17 | { |
||
18 | /* ----------------------------------------------------------------- |
||
19 | | Traits |
||
20 | | ----------------------------------------------------------------- |
||
21 | */ |
||
22 | |||
23 | use CanBeJsonable; |
||
24 | |||
25 | /* ----------------------------------------------------------------- |
||
26 | | Properties |
||
27 | | ----------------------------------------------------------------- |
||
28 | */ |
||
29 | |||
30 | /** |
||
31 | * The elevation value. |
||
32 | * |
||
33 | * @var float |
||
34 | */ |
||
35 | protected $value; |
||
36 | |||
37 | /** |
||
38 | * The location. |
||
39 | * |
||
40 | * @var \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
41 | */ |
||
42 | protected $location; |
||
43 | |||
44 | /** |
||
45 | * The resolution. |
||
46 | * |
||
47 | * @var float |
||
48 | */ |
||
49 | protected $resolution; |
||
50 | |||
51 | /* ----------------------------------------------------------------- |
||
52 | | Constructor |
||
53 | | ----------------------------------------------------------------- |
||
54 | */ |
||
55 | |||
56 | /** |
||
57 | * Elevation constructor. |
||
58 | * |
||
59 | * @param array $data |
||
60 | */ |
||
61 | 9 | public function __construct(array $data) |
|
67 | |||
68 | /* ----------------------------------------------------------------- |
||
69 | | Getters & Setters |
||
70 | | ----------------------------------------------------------------- |
||
71 | */ |
||
72 | |||
73 | /** |
||
74 | * Get the elevation value. |
||
75 | * |
||
76 | * @return float |
||
77 | */ |
||
78 | 9 | public function value() |
|
82 | |||
83 | /** |
||
84 | * Get the location. |
||
85 | * |
||
86 | * @return \Arcanedev\GeoLocation\Contracts\Entities\Coordinates\Position |
||
87 | */ |
||
88 | 9 | public function location() |
|
92 | |||
93 | /** |
||
94 | * Get the resolution. |
||
95 | * |
||
96 | * @return float |
||
97 | */ |
||
98 | 9 | public function resolution() |
|
102 | |||
103 | /* ----------------------------------------------------------------- |
||
104 | | Main Methods |
||
105 | | ----------------------------------------------------------------- |
||
106 | */ |
||
107 | |||
108 | /** |
||
109 | * Get the instance as an array. |
||
110 | * |
||
111 | * @return array |
||
112 | */ |
||
113 | 3 | public function toArray() |
|
121 | } |
||
122 |