1 | <?php |
||
10 | abstract class BaseAddress implements CreatableFromArray |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $streetAddress; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $careOf; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $zipCode; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $city; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $country; |
||
36 | |||
37 | /** |
||
38 | * @return string |
||
39 | */ |
||
40 | public function getCareOf() |
||
44 | |||
45 | /** |
||
46 | * @param string $careOf |
||
47 | * |
||
48 | * @return self |
||
49 | */ |
||
50 | public function withCareOf(string $careOf) |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getStreetAddress() |
||
65 | |||
66 | /** |
||
67 | * @param string $streetAddress |
||
68 | * |
||
69 | * @return self |
||
70 | */ |
||
71 | public function withStreetAddress(string $streetAddress) |
||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getZipCode() |
||
86 | |||
87 | /** |
||
88 | * @param string $zipCode |
||
89 | * |
||
90 | * @return self |
||
91 | */ |
||
92 | public function withZipCode(string $zipCode) |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getCity() |
||
107 | |||
108 | /** |
||
109 | * @param string $city |
||
110 | * |
||
111 | * @return self |
||
112 | */ |
||
113 | public function withCity(string $city) |
||
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getCountry() |
||
128 | |||
129 | /** |
||
130 | * @param string $country |
||
131 | * |
||
132 | * @return self |
||
133 | */ |
||
134 | public function withCountry(string $country) |
||
141 | |||
142 | 1 | public function toArray() |
|
163 | } |
||
164 |