forked from ElisaLeroy/boutique-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clientClasse.php
48 lines (37 loc) · 1001 Bytes
/
clientClasse.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
38
39
40
41
42
43
44
45
46
47
48
<?php
//définit, permet d'accéder aux colonnes d'un client (comme class Item)
class client{
private int $id;
private string $lastName;
private string $firstName;
private string $address;
private int $cp;
private string $city;
public function __construct(array $customer)
{
$this->id = $customer['id'];
$this->lastName = $customer['last_name'];
$this->firstName = $customer['first_name'];
$this->address = $customer['Address'];
$this->cp = $customer['CP'];
$this->city = $customer['City'];
}
public function getId() {
return $this->id;
}
public function getLastName() {
return $this->lastName;
}
public function getFirstName() {
return $this->firstName;
}
public function getAddress() {
return $this->address;
}
public function getCp() {
return $this->cp;
}
public function getCity() {
return $this->city;
}
}