1 <?php
2 /* --------------------------------------------------------------
3 AddressBlock.inc.php 2015-01-30 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2014 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 MainFactory::load_class('AddressBlockInterface');
13
14 /**
15 * Value Object
16 *
17 * Class AddressBlock
18 *
19 * Stores all customer address data
20 *
21 * @category System
22 * @package Customer
23 * @subpackage ValueObjects
24 *
25 * @implements AddressBlockInterface
26 */
27 class AddressBlock implements AddressBlockInterface
28 {
29 /**
30 * Customer's gender.
31 * @var CustomerGenderInterface
32 */
33 protected $gender;
34
35 /**
36 * Customer first name.
37 * @var CustomerFirstnameInterface
38 */
39 protected $firstname;
40
41 /**
42 * Customer last name.
43 * @var CustomerLastnameInterface
44 */
45 protected $lastname;
46
47 /**
48 * Customer's company.
49 * @var CustomerCompanyInterface
50 */
51 protected $company;
52
53 /**
54 * Customer's street.
55 * @var CustomerStreetInterface
56 */
57 protected $street;
58
59 /**
60 * Customer's suburb.
61 * @var CustomerSuburbInterface
62 */
63 protected $suburb;
64
65 /**
66 * Customer's post code.
67 * @var CustomerPostcodeInterface
68 */
69 protected $postcode;
70
71 /**
72 * Customer's city.
73 * @var CustomerCityInterface
74 */
75 protected $city;
76
77 /**
78 * Customer's country.
79 * @var CustomerCountryInterface
80 */
81 protected $country;
82
83 /**
84 * Customer's country zone.
85 * @var CustomerCountryZoneInterface
86 */
87 protected $countryZone;
88
89 /**
90 * Customer's B2B status.
91 * @var CustomerB2BStatusInterface
92 */
93 protected $b2bStatus;
94
95
96 /**
97 * Constructor of the class AddressBlock.
98 *
99 * @param CustomerGenderInterface $gender Customer's gender.
100 * @param CustomerFirstnameInterface $firstname Customer's first name.
101 * @param CustomerLastnameInterface $lastname Customer's last name.
102 * @param CustomerCompanyInterface $company Customer's company.
103 * @param CustomerB2BStatusInterface $b2bStatus Customer's B2B status.
104 * @param CustomerStreetInterface $street Customer's street.
105 * @param CustomerSuburbInterface $suburb Customer's suburb.
106 * @param CustomerPostcodeInterface $postcode Customer's post code.
107 * @param CustomerCityInterface $city Customer's city.
108 * @param CustomerCountryInterface $country Customer's country.
109 * @param CustomerCountryZoneInterface $countryZone Customer's country zone.
110 * @param CustomerB2BStatusInterface $b2bStatus Customer's B2B status.
111 */
112 public function __construct(CustomerGenderInterface $gender,
113 CustomerFirstnameInterface $firstname,
114 CustomerLastnameInterface $lastname,
115 CustomerCompanyInterface $company,
116 CustomerB2BStatusInterface $b2bStatus,
117 CustomerStreetInterface $street,
118 CustomerSuburbInterface $suburb,
119 CustomerPostcodeInterface $postcode,
120 CustomerCityInterface $city,
121 CustomerCountryInterface $country,
122 CustomerCountryZoneInterface $countryZone = null)
123 {
124 $this->gender = $gender;
125 $this->firstname = $firstname;
126 $this->lastname = $lastname;
127 $this->company = $company;
128 $this->b2bStatus = $b2bStatus;
129 $this->street = $street;
130 $this->suburb = $suburb;
131 $this->postcode = $postcode;
132 $this->city = $city;
133 $this->country = $country;
134 $this->countryZone = $countryZone;
135 }
136
137
138 /**
139 * Returns the customer's gender.
140 *
141 * @return CustomerGenderInterface Customer's gender.
142 */
143 public function getGender()
144 {
145 return $this->gender;
146 }
147
148
149 /**
150 * Returns the customer's first name.
151 *
152 * @return CustomerFirstnameInterface Customer's first name.
153 */
154 public function getFirstname()
155 {
156 return $this->firstname;
157 }
158
159
160 /**
161 * Returns the customer's last name.
162 *
163 * @return CustomerLastnameInterface Customer's last name.
164 */
165 public function getLastname()
166 {
167 return $this->lastname;
168 }
169
170
171 /**
172 * Returns the customer's company.
173 *
174 * @return CustomerCompanyInterface Customer's company.
175 */
176 public function getCompany()
177 {
178 return $this->company;
179 }
180
181
182 /**
183 * Returns the customer's B2B status.
184 *
185 * @return CustomerB2BStatusInterface Customer's B2B status.
186 */
187 public function getB2BStatus()
188 {
189 return $this->b2bStatus;
190 }
191
192
193 /**
194 * Returns the customer's street.
195 *
196 * @return CustomerStreetInterface Customer's street.
197 */
198 public function getStreet()
199 {
200 return $this->street;
201 }
202
203
204 /**
205 * Returns the customer's suburb.
206 *
207 * @return CustomerSuburbInterface Customer's suburb.
208 */
209 public function getSuburb()
210 {
211 return $this->suburb;
212 }
213
214
215 /**
216 * Returns the customer's postcode.
217 *
218 * @return CustomerPostcodeInterface Customer's postcode.
219 */
220 public function getPostcode()
221 {
222 return $this->postcode;
223 }
224
225
226 /**
227 * Returns the customer's city.
228 *
229 * @return CustomerCityInterface Customer's city.
230 */
231 public function getCity()
232 {
233 return $this->city;
234 }
235
236
237 /**
238 * Returns the customer's country.
239 *
240 * @return CustomerCountryInterface Customer's country.
241 */
242 public function getCountry()
243 {
244 return $this->country;
245 }
246
247
248 /**
249 * Returns the customer's country zone.
250 *
251 * @return CustomerCountryZoneInterface Customer's country zone.
252 */
253 public function getCountryZone()
254 {
255 return $this->countryZone;
256 }
257 }