diff options
author | polo <ordipolo@gmx.fr> | 2022-12-14 12:55:46 +0100 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2022-12-14 12:55:46 +0100 |
commit | ff14091476a35de16a9ea3208501040cfae93a06 (patch) | |
tree | 89ebd00ad68fbb97aac71ef8a2972748f82dee0d /src/model/Clients.php | |
parent | a45a3e0345890b9df3c5fa7c82966a64491eca02 (diff) | |
download | AppliGestionPHP-ff14091476a35de16a9ea3208501040cfae93a06.zip |
MODEL + reorganisation
Diffstat (limited to 'src/model/Clients.php')
-rw-r--r-- | src/model/Clients.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/model/Clients.php b/src/model/Clients.php new file mode 100644 index 0000000..1256458 --- /dev/null +++ b/src/model/Clients.php | |||
@@ -0,0 +1,50 @@ | |||
1 | <?php | ||
2 | // model/Clients.php | ||
3 | |||
4 | class Clients extends Model | ||
5 | { | ||
6 | // lecture des données ou hydratation | ||
7 | public $ID; | ||
8 | public $prenom_nom; | ||
9 | public $adresse; | ||
10 | public $code_client; | ||
11 | public $commentaires; | ||
12 | |||
13 | public function __construct() | ||
14 | { | ||
15 | $this->table = strtolower(__CLASS__); // simple parce que la classe a le nom de la table | ||
16 | } | ||
17 | |||
18 | //~ public function set(string $variable, $value) | ||
19 | //~ { | ||
20 | //~ $this->$variable = $value; | ||
21 | //~ return($this); | ||
22 | //~ } | ||
23 | |||
24 | // setters | ||
25 | public function setID(int $value) // inutile? il s'autoincrémente | ||
26 | { | ||
27 | $this->ID = $value; | ||
28 | return($this); | ||
29 | } | ||
30 | public function setPrenom_nom(string $value) | ||
31 | { | ||
32 | $this->prenom_nom = $value; | ||
33 | return($this); | ||
34 | } | ||
35 | public function setAdresse(string $value) | ||
36 | { | ||
37 | $this->adresse = $value; | ||
38 | return($this); | ||
39 | } | ||
40 | public function setCode_client(string $value) | ||
41 | { | ||
42 | $this->code_client = $value; | ||
43 | return($this); | ||
44 | } | ||
45 | public function setCommentaires(string $value) | ||
46 | { | ||
47 | $this->commentaires = $value; | ||
48 | return($this); | ||
49 | } | ||
50 | } | ||