1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace luya\web\jsonld; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Geo Coordinates |
7
|
|
|
* |
8
|
|
|
* @author Basil Suter <[email protected]> |
9
|
|
|
* @since 1.0.14 |
10
|
|
|
*/ |
11
|
|
|
class GeoCoordinates extends BaseThing |
12
|
|
|
{ |
13
|
|
|
public function typeDefintion() |
14
|
|
|
{ |
15
|
|
|
return 'GeoCoordinates'; |
16
|
|
|
} |
17
|
|
|
|
18
|
|
|
private $_address; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Set Address |
22
|
|
|
* |
23
|
|
|
* @param PostalAddress $address |
24
|
|
|
* @return static |
25
|
|
|
*/ |
26
|
|
|
public function setAddress(PostalAddress $address) |
27
|
|
|
{ |
28
|
|
|
$this->_address = $address; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Get address |
33
|
|
|
* |
34
|
|
|
* @return string |
35
|
|
|
*/ |
36
|
|
|
public function getAddress() |
37
|
|
|
{ |
38
|
|
|
return $this->_address; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
private $_addressCountry; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Set address country |
45
|
|
|
* |
46
|
|
|
* @param string $addressCountry |
47
|
|
|
* @return static |
48
|
|
|
*/ |
49
|
|
|
public function setAddressCountry($addressCountry) |
50
|
|
|
{ |
51
|
|
|
$this->_addressCountry = $addressCountry; |
52
|
|
|
return $this; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Get address country |
57
|
|
|
* |
58
|
|
|
* @return string |
59
|
|
|
*/ |
60
|
|
|
public function getAddressCountry() |
61
|
|
|
{ |
62
|
|
|
return $this->_addressCountry; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
private $_elevation; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Set elevation |
69
|
|
|
* |
70
|
|
|
* @param string $elevation |
71
|
|
|
* @return static |
72
|
|
|
*/ |
73
|
|
|
public function setElevation($elevation) |
74
|
|
|
{ |
75
|
|
|
$this->_elevation = $elevation; |
76
|
|
|
|
77
|
|
|
return $this; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* get elevation |
82
|
|
|
* |
83
|
|
|
* @return string |
84
|
|
|
*/ |
85
|
|
|
public function getElevation() |
86
|
|
|
{ |
87
|
|
|
return $this->_elevation; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
private $_latitude; |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Set Latitude |
94
|
|
|
* |
95
|
|
|
* @param string $latitude |
96
|
|
|
* @return static |
97
|
|
|
*/ |
98
|
|
|
public function setLatitude($latitude) |
99
|
|
|
{ |
100
|
|
|
$this->_latitude = $latitude; |
101
|
|
|
|
102
|
|
|
return $this; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Get Latitude |
107
|
|
|
* |
108
|
|
|
* @return string |
109
|
|
|
*/ |
110
|
|
|
public function getLatitude() |
111
|
|
|
{ |
112
|
|
|
return $this->_latitude; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
private $_longitude; |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Set longitude |
119
|
|
|
* |
120
|
|
|
* @param string $longitude |
121
|
|
|
* @return static |
122
|
|
|
*/ |
123
|
|
|
public function setLongitude($longitude) |
124
|
|
|
{ |
125
|
|
|
$this->_longitude = $longitude; |
126
|
|
|
|
127
|
|
|
return $this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Get longitude |
132
|
|
|
* |
133
|
|
|
* @return string |
134
|
|
|
*/ |
135
|
|
|
public function getLongitude() |
136
|
|
|
{ |
137
|
|
|
return $this->_longitude; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
private $_postalCode; |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* Set postal code |
144
|
|
|
* |
145
|
|
|
* @param string $postalCode |
146
|
|
|
* @return static |
147
|
|
|
*/ |
148
|
|
|
public function setPostalCode($postalCode) |
149
|
|
|
{ |
150
|
|
|
$this->_postalCode = $postalCode; |
151
|
|
|
|
152
|
|
|
return $this; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* Get postal code |
157
|
|
|
* |
158
|
|
|
* @return string |
159
|
|
|
*/ |
160
|
|
|
public function getPostalCode() |
161
|
|
|
{ |
162
|
|
|
return $this->_postalCode; |
163
|
|
|
} |
164
|
|
|
} |