summaryrefslogtreecommitdiff
path: root/src/model/Locations.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/Locations.php')
-rw-r--r--src/model/Locations.php40
1 files changed, 36 insertions, 4 deletions
diff --git a/src/model/Locations.php b/src/model/Locations.php
index e3c9507..ead2727 100644
--- a/src/model/Locations.php
+++ b/src/model/Locations.php
@@ -24,16 +24,48 @@ class Locations extends Model
24 public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) 24 public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this)
25 { 25 {
26 return [ 26 return [
27 "Numéro location:" => $this->ID,
28 "Désignation:" => $this->designation, 27 "Désignation:" => $this->designation,
29 "Description du modèle:" => $this->modele_description, 28 "Description du modèle:" => $this->modele_description,
30 "Valeur:" => $this->valeur, 29 "Valeur:" => $this->valeur,
31 "État des lieux de début:" => $this->etat_des_lieux_debut, 30 "État des lieux de début:" => $this->etat_des_lieux_debut,
32 "État des lieux de fin:" => $this->etat_des_lieux_fin, 31 "État des lieux de fin:" => $this->etat_des_lieux_fin,
33 "Durée de la location:" => $this->duree_location, 32 "Durée de la location:" => $this->duree_location,
34 "Loyer Mensuel" => $this->loyer_mensuel, 33 "Loyer Mensuel:" => $this->loyer_mensuel,
35 "Loyers Payés" => $this->loyers_payes, 34 "Loyers Payés:" => $this->loyers_payes,
36 "Caution" => $this->caution]; 35 "Caution:" => $this->caution];
36 }
37 public function set(string $entry, string $input)
38 {
39 switch($entry)
40 {
41 case "Désignation:":
42 $this->setDesignation($input);
43 break;
44 case "Description du modèle:":
45 $this->setModeleDescription($input);
46 break;
47 case "Valeur:":
48 $this->setValeur($input);
49 break;
50 case "État des lieux de début:":
51 $this->setEtatDesLieuxDebut($input);
52 break;
53 case "État des lieux de fin:":
54 $this->setEtatDesLieuxFin($input);
55 break;
56 case "Durée de la location:":
57 $this->setDureeLocation($input);
58 break;
59 case "Loyer Mensuel:":
60 $this->setLoyerMensuel($input);
61 break;
62 case "Loyers Payés:":
63 $this->setLoyersPayes($input);
64 break;
65 case "Caution:":
66 $this->setCaution($input);
67 break;
68 }
37 } 69 }
38 70
39 // setters 71 // setters