diff options
| author | polo <ordipolo@gmx.fr> | 2024-07-16 05:04:13 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2024-07-16 05:04:13 +0200 |
| commit | 9c9cda0ac823863c6760d77984ea2ecaf87c52ab (patch) | |
| tree | fc00fd9fbd71bf2b62bca5fe5627f2a9e816870d /src/model/Clients.php | |
| parent | c4a3f80a6dccdff9b2abff6f159ef8fdd4382787 (diff) | |
| download | AppliGestionPHP-9c9cda0ac823863c6760d77984ea2ecaf87c52ab.tar.gz AppliGestionPHP-9c9cda0ac823863c6760d77984ea2ecaf87c52ab.tar.bz2 AppliGestionPHP-9c9cda0ac823863c6760d77984ea2ecaf87c52ab.zip | |
renommage complet des ID en id: variables, méthodes, BDD
Diffstat (limited to 'src/model/Clients.php')
| -rw-r--r-- | src/model/Clients.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/model/Clients.php b/src/model/Clients.php index ce38d86..32cf0c5 100644 --- a/src/model/Clients.php +++ b/src/model/Clients.php | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | class Clients extends Model | 4 | class Clients extends Model |
| 5 | { | 5 | { |
| 6 | // lecture des données ou hydratation | 6 | // lecture des données ou hydratation |
| 7 | protected $ID; // auto-incrémentée | 7 | protected $id; // auto-incrémentée |
| 8 | protected $prenom_nom; | 8 | protected $prenom_nom; |
| 9 | protected $code_client; | 9 | protected $code_client; |
| 10 | protected $adresse; | 10 | protected $adresse; |
| @@ -21,9 +21,9 @@ class Clients extends Model | |||
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | // getters | 23 | // getters |
| 24 | public function getID(): int | 24 | public function getId(): int |
| 25 | { | 25 | { |
| 26 | return $this->ID; | 26 | return $this->id; |
| 27 | } | 27 | } |
| 28 | public function getCodeClient(): string | 28 | public function getCodeClient(): string |
| 29 | { | 29 | { |
| @@ -152,7 +152,7 @@ class Clients extends Model | |||
| 152 | $already_exist = false; | 152 | $already_exist = false; |
| 153 | for($j = 0; $j < count($result); $j++) // pour chaque tableau déjà enregistré dans le tableau $result | 153 | for($j = 0; $j < count($result); $j++) // pour chaque tableau déjà enregistré dans le tableau $result |
| 154 | { | 154 | { |
| 155 | if($result[$j]['ID'] === $one_array['ID']) | 155 | if($result[$j]['id'] === $one_array['id']) |
| 156 | { | 156 | { |
| 157 | $already_exist = true; | 157 | $already_exist = true; |
| 158 | } | 158 | } |
