You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
606 B
PHP
30 lines
606 B
PHP
<?php
|
|
|
|
class Location {
|
|
|
|
public $number = "";
|
|
public $streetname = "";
|
|
|
|
/**
|
|
*
|
|
* @var string Number and street name.
|
|
*/
|
|
public $street = "";
|
|
public $unit = "";
|
|
public $city = "";
|
|
public $state = "";
|
|
public $zip = "";
|
|
public $country = "";
|
|
public $latitude = false;
|
|
public $longitude = false;
|
|
|
|
public function hasAddress(): bool {
|
|
return ($number . $streetname . $street . $city . $state . $zip . $country != "");
|
|
}
|
|
|
|
public function hasCoordinates(): bool {
|
|
return ($latitude !== false && $longitude !== false);
|
|
}
|
|
|
|
}
|