| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class Address. |
| 4 |
* |
| 5 |
* @package Packetery\Entity |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace Packetery\Core\Entity; |
| 11 |
|
| 12 |
/** |
| 13 |
* Class Address. |
| 14 |
* |
| 15 |
* @package Packetery\Entity |
| 16 |
*/ |
| 17 |
class Address { |
| 18 |
|
| 19 |
/** |
| 20 |
* Customer street for address delivery. |
| 21 |
* |
| 22 |
* @var string|null |
| 23 |
*/ |
| 24 |
private $street; |
| 25 |
|
| 26 |
/** |
| 27 |
* Customer city for address delivery. |
| 28 |
* |
| 29 |
* @var string|null |
| 30 |
*/ |
| 31 |
private $city; |
| 32 |
|
| 33 |
/** |
| 34 |
* Customer zip for address delivery. |
| 35 |
* |
| 36 |
* @var string|null |
| 37 |
*/ |
| 38 |
private $zip; |
| 39 |
|
| 40 |
/** |
| 41 |
* Customer house number. |
| 42 |
* |
| 43 |
* @var string|null |
| 44 |
*/ |
| 45 |
private $houseNumber; |
| 46 |
|
| 47 |
/** |
| 48 |
* Longitude. |
| 49 |
* |
| 50 |
* @var string|null |
| 51 |
*/ |
| 52 |
private $longitude; |
| 53 |
|
| 54 |
/** |
| 55 |
* Latitude. |
| 56 |
* |
| 57 |
* @var string|null |
| 58 |
*/ |
| 59 |
private $latitude; |
| 60 |
|
| 61 |
/** |
| 62 |
* County. |
| 63 |
* |
| 64 |
* @var string|null |
| 65 |
*/ |
| 66 |
private $county; |
| 67 |
|
| 68 |
/** |
| 69 |
* Address constructor. |
| 70 |
* |
| 71 |
* @param string|null $street Street. |
| 72 |
* @param string|null $city City. |
| 73 |
* @param string|null $zip Zip. |
| 74 |
*/ |
| 75 |
public function __construct( ?string $street, ?string $city, ?string $zip ) { |
| 76 |
$this->street = $street; |
| 77 |
$this->city = $city; |
| 78 |
$this->zip = $zip; |
| 79 |
} |
| 80 |
|
| 81 |
/** |
| 82 |
* Gets street. |
| 83 |
* |
| 84 |
* @return string|null |
| 85 |
*/ |
| 86 |
public function getStreet(): ?string { |
| 87 |
return $this->street; |
| 88 |
} |
| 89 |
|
| 90 |
/** |
| 91 |
* Gets city. |
| 92 |
* |
| 93 |
* @return string|null |
| 94 |
*/ |
| 95 |
public function getCity(): ?string { |
| 96 |
return $this->city; |
| 97 |
} |
| 98 |
|
| 99 |
/** |
| 100 |
* Gets zip. |
| 101 |
* |
| 102 |
* @return string|null |
| 103 |
*/ |
| 104 |
public function getZip(): ?string { |
| 105 |
return $this->zip; |
| 106 |
} |
| 107 |
|
| 108 |
/** |
| 109 |
* Gets house number. |
| 110 |
* |
| 111 |
* @return string|null |
| 112 |
*/ |
| 113 |
public function getHouseNumber(): ?string { |
| 114 |
return $this->houseNumber; |
| 115 |
} |
| 116 |
|
| 117 |
/** |
| 118 |
* Sets house number. |
| 119 |
* |
| 120 |
* @param string|null $houseNumber House number. |
| 121 |
*/ |
| 122 |
public function setHouseNumber( ?string $houseNumber ): void { |
| 123 |
$this->houseNumber = $houseNumber; |
| 124 |
} |
| 125 |
|
| 126 |
/** |
| 127 |
* Gets longitude. |
| 128 |
* |
| 129 |
* @return string|null |
| 130 |
*/ |
| 131 |
public function getLongitude(): ?string { |
| 132 |
return $this->longitude; |
| 133 |
} |
| 134 |
|
| 135 |
/** |
| 136 |
* Sets longitude. |
| 137 |
* |
| 138 |
* @param string|null $longitude Longitude. |
| 139 |
* |
| 140 |
* @return void |
| 141 |
*/ |
| 142 |
public function setLongitude( ?string $longitude ): void { |
| 143 |
$this->longitude = $longitude; |
| 144 |
} |
| 145 |
|
| 146 |
/** |
| 147 |
* Gets latitude. |
| 148 |
* |
| 149 |
* @return string|null |
| 150 |
*/ |
| 151 |
public function getLatitude(): ?string { |
| 152 |
return $this->latitude; |
| 153 |
} |
| 154 |
|
| 155 |
/** |
| 156 |
* Sets latitude. |
| 157 |
* |
| 158 |
* @param string|null $latitude Latitude. |
| 159 |
* |
| 160 |
* @return void |
| 161 |
*/ |
| 162 |
public function setLatitude( ?string $latitude ): void { |
| 163 |
$this->latitude = $latitude; |
| 164 |
} |
| 165 |
|
| 166 |
/** |
| 167 |
* Gets county. |
| 168 |
* |
| 169 |
* @return string|null |
| 170 |
*/ |
| 171 |
public function getCounty(): ?string { |
| 172 |
return $this->county; |
| 173 |
} |
| 174 |
|
| 175 |
/** |
| 176 |
* Sets county. |
| 177 |
* |
| 178 |
* @param string|null $county County. |
| 179 |
* |
| 180 |
* @return void |
| 181 |
*/ |
| 182 |
public function setCounty( ?string $county ): void { |
| 183 |
$this->county = $county; |
| 184 |
} |
| 185 |
|
| 186 |
/** |
| 187 |
* Export. |
| 188 |
* |
| 189 |
* @return array |
| 190 |
*/ |
| 191 |
public function export(): array { |
| 192 |
return get_object_vars( $this ); |
| 193 |
} |
| 194 |
} |
| 195 |
|