1 | <?php |
||
16 | class VisitLocation extends AbstractEntity implements ArraySerializableInterface, \JsonSerializable |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | * @ORM\Column(nullable=true) |
||
21 | */ |
||
22 | protected $countryCode; |
||
23 | /** |
||
24 | * @var string |
||
25 | * @ORM\Column(nullable=true) |
||
26 | */ |
||
27 | protected $countryName; |
||
28 | /** |
||
29 | * @var string |
||
30 | * @ORM\Column(nullable=true) |
||
31 | */ |
||
32 | protected $regionName; |
||
33 | /** |
||
34 | * @var string |
||
35 | * @ORM\Column(nullable=true) |
||
36 | */ |
||
37 | protected $cityName; |
||
38 | /** |
||
39 | * @var string |
||
40 | * @ORM\Column(nullable=true) |
||
41 | */ |
||
42 | protected $latitude; |
||
43 | /** |
||
44 | * @var string |
||
45 | * @ORM\Column(nullable=true) |
||
46 | */ |
||
47 | protected $longitude; |
||
48 | /** |
||
49 | * @var string |
||
50 | * @ORM\Column(nullable=true) |
||
51 | */ |
||
52 | protected $timezone; |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getCountryCode() |
||
61 | |||
62 | /** |
||
63 | * @param string $countryCode |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setCountryCode($countryCode) |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getCountryName() |
||
79 | |||
80 | /** |
||
81 | * @param string $countryName |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function setCountryName($countryName) |
||
89 | |||
90 | /** |
||
91 | * @return string |
||
92 | */ |
||
93 | public function getRegionName() |
||
97 | |||
98 | /** |
||
99 | * @param string $regionName |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setRegionName($regionName) |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 2 | public function getCityName() |
|
115 | |||
116 | /** |
||
117 | * @param string $cityName |
||
118 | * @return $this |
||
119 | */ |
||
120 | public function setCityName($cityName) |
||
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getLatitude() |
||
133 | |||
134 | /** |
||
135 | * @param string $latitude |
||
136 | * @return $this |
||
137 | */ |
||
138 | public function setLatitude($latitude) |
||
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | public function getLongitude() |
||
151 | |||
152 | /** |
||
153 | * @param string $longitude |
||
154 | * @return $this |
||
155 | */ |
||
156 | public function setLongitude($longitude) |
||
161 | |||
162 | /** |
||
163 | * @return string |
||
164 | */ |
||
165 | public function getTimezone() |
||
169 | |||
170 | /** |
||
171 | * @param string $timezone |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function setTimezone($timezone) |
||
179 | |||
180 | /** |
||
181 | * Exchange internal values from provided array |
||
182 | * |
||
183 | * @param array $array |
||
184 | * @return void |
||
185 | */ |
||
186 | 2 | public function exchangeArray(array $array) |
|
187 | { |
||
188 | 2 | if (array_key_exists('country_code', $array)) { |
|
189 | $this->setCountryCode($array['country_code']); |
||
190 | } |
||
191 | 2 | if (array_key_exists('country_name', $array)) { |
|
192 | $this->setCountryName($array['country_name']); |
||
193 | } |
||
194 | 2 | if (array_key_exists('region_name', $array)) { |
|
195 | $this->setRegionName($array['region_name']); |
||
196 | } |
||
197 | 2 | if (array_key_exists('city', $array)) { |
|
198 | $this->setCityName($array['city']); |
||
199 | } |
||
200 | 2 | if (array_key_exists('latitude', $array)) { |
|
201 | $this->setLatitude($array['latitude']); |
||
202 | } |
||
203 | 2 | if (array_key_exists('longitude', $array)) { |
|
204 | $this->setLongitude($array['longitude']); |
||
205 | } |
||
206 | 2 | if (array_key_exists('time_zone', $array)) { |
|
207 | $this->setTimezone($array['time_zone']); |
||
208 | } |
||
209 | 2 | } |
|
210 | |||
211 | /** |
||
212 | * Return an array representation of the object |
||
213 | * |
||
214 | * @return array |
||
215 | */ |
||
216 | public function getArrayCopy() |
||
217 | { |
||
218 | return [ |
||
219 | 'countryCode' => $this->countryCode, |
||
220 | 'countryName' => $this->countryName, |
||
221 | 'regionName' => $this->regionName, |
||
222 | 'cityName' => $this->cityName, |
||
223 | 'latitude' => $this->latitude, |
||
224 | 'longitude' => $this->longitude, |
||
225 | 'timezone' => $this->timezone, |
||
226 | ]; |
||
227 | } |
||
228 | |||
229 | /** |
||
230 | * Specify data which should be serialized to JSON |
||
231 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
232 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
233 | * which is a value of any type other than a resource. |
||
234 | * @since 5.4.0 |
||
235 | */ |
||
236 | public function jsonSerialize() |
||
240 | } |
||
241 |