-
Notifications
You must be signed in to change notification settings - Fork 0
/
dto.php
37 lines (30 loc) · 816 Bytes
/
dto.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
class User {
private string $firstName;
private string $lastName;
private string $street;
private string $zip;
private string $city;
public function __construct(array $data) {
$this->firstName = $data['firstName'];
$this->lastName = $data['lastName'];
$this->street = $data['street'];
$this->zip = $data['zip'];
$this->city = $data['city'];
}
public function getFirstName(): string {
return $this->firstName;
}
public function getLastName(): string {
return $this->lastName;
}
public function getStreet(): string {
return $this->street;
}
public function getZip(): string {
return $this->zip;
}
public function getCity(): string {
return $this->city;
}
}