@@ -8,22 +8,125 @@ class Address extends DataObject
88{
99 public function __construct (
1010 private readonly AddressRenderer $ addressRenderer ,
11- private readonly string $ street ,
12- private readonly string $ houseNumber ,
13- private readonly string $ houseNumberAddition ,
14- private readonly string $ postcode ,
15- private readonly string $ city ,
16- private readonly string $ countryId ,
17- private readonly ?float $ latitude = null ,
18- private readonly ?float $ longitude = null ,
19- private readonly string $ phone = '' ,
20- private readonly string $ comment = '' ,
21- private readonly string $ company = '' ,
11+ private string $ street = '' ,
12+ private string $ houseNumber = '' ,
13+ private string $ houseNumberAddition = '' ,
14+ private string $ postcode = '' ,
15+ private string $ city = '' ,
16+ private string $ region = '' ,
17+ private string $ countryId = '' ,
18+ private ?float $ latitude = null ,
19+ private ?float $ longitude = null ,
20+ private string $ telephone = '' ,
21+ private string $ fax = '' ,
22+ private string $ vatId = '' ,
23+ private string $ comment = '' ,
24+ private string $ company = '' ,
25+ private string $ prefix = '' ,
26+ private string $ firstname = '' ,
27+ private string $ middlename = '' ,
28+ private string $ lastname = '' ,
29+ private string $ suffix = '' ,
2230 array $ data = []
2331 ) {
2432 parent ::__construct ($ data );
2533 }
2634
35+ public function setStreet (string $ street ): void
36+ {
37+ $ this ->street = $ street ;
38+ }
39+
40+ public function setHouseNumber (string $ houseNumber ): void
41+ {
42+ $ this ->houseNumber = $ houseNumber ;
43+ }
44+
45+ public function setHouseNumberAddition (string $ houseNumberAddition ): void
46+ {
47+ $ this ->houseNumberAddition = $ houseNumberAddition ;
48+ }
49+
50+ public function setPostcode (string $ postcode ): void
51+ {
52+ $ this ->postcode = $ postcode ;
53+ }
54+
55+ public function setCity (string $ city ): void
56+ {
57+ $ this ->city = $ city ;
58+ }
59+
60+ public function setRegion (string $ region ): void
61+ {
62+ $ this ->region = $ region ;
63+ }
64+
65+ public function setCountryId (string $ countryId ): void
66+ {
67+ $ this ->countryId = $ countryId ;
68+ }
69+
70+ public function setLatitude (?float $ latitude ): void
71+ {
72+ $ this ->latitude = $ latitude ;
73+ }
74+
75+ public function setLongitude (?float $ longitude ): void
76+ {
77+ $ this ->longitude = $ longitude ;
78+ }
79+
80+ public function setTelephone (string $ telephone ): void
81+ {
82+ $ this ->telephone = $ telephone ;
83+ }
84+
85+ public function setFax (string $ fax ): void
86+ {
87+ $ this ->fax = $ fax ;
88+ }
89+
90+ public function setVatId (string $ vatId ): void
91+ {
92+ $ this ->vatId = $ vatId ;
93+ }
94+
95+ public function setComment (string $ comment ): void
96+ {
97+ $ this ->comment = $ comment ;
98+ }
99+
100+ public function setCompany (string $ company ): void
101+ {
102+ $ this ->company = $ company ;
103+ }
104+
105+ public function setPrefix (string $ prefix ): void
106+ {
107+ $ this ->prefix = $ prefix ;
108+ }
109+
110+ public function setFirstname (string $ firstname ): void
111+ {
112+ $ this ->firstname = $ firstname ;
113+ }
114+
115+ public function setMiddlename (string $ middlename ): void
116+ {
117+ $ this ->middlename = $ middlename ;
118+ }
119+
120+ public function setLastname (string $ lastname ): void
121+ {
122+ $ this ->lastname = $ lastname ;
123+ }
124+
125+ public function setSuffix (string $ suffix ): void
126+ {
127+ $ this ->suffix = $ suffix ;
128+ }
129+
27130 public function getStreet (): string
28131 {
29132 return $ this ->street ;
@@ -64,6 +167,11 @@ public function getLongitude(): ?float
64167 return $ this ->longitude ;
65168 }
66169
170+ public function getAddressLine (): string
171+ {
172+ return $ this ->addressRenderer ->getLine ($ this );
173+ }
174+
67175 public function getInnerHtml (): string
68176 {
69177 return $ this ->addressRenderer ->getHtml ($ this );
@@ -79,8 +187,48 @@ public function getHouseNumberAddition(): string
79187 return $ this ->houseNumberAddition ;
80188 }
81189
82- public function getPhone (): string
190+ public function getPrefix (): string
191+ {
192+ return $ this ->prefix ;
193+ }
194+
195+ public function getFirstname (): string
196+ {
197+ return $ this ->firstname ;
198+ }
199+
200+ public function getMiddlename (): string
201+ {
202+ return $ this ->middlename ;
203+ }
204+
205+ public function getLastname (): string
206+ {
207+ return $ this ->lastname ;
208+ }
209+
210+ public function getSuffix (): string
211+ {
212+ return $ this ->suffix ;
213+ }
214+
215+ public function getRegion (): string
216+ {
217+ return $ this ->region ;
218+ }
219+
220+ public function getTelephone (): string
221+ {
222+ return $ this ->telephone ;
223+ }
224+
225+ public function getFax (): string
226+ {
227+ return $ this ->fax ;
228+ }
229+
230+ public function getVatId (): string
83231 {
84- return $ this ->phone ;
232+ return $ this ->vatId ;
85233 }
86234}
0 commit comments