summaryrefslogtreecommitdiff
path: root/src/model/Clients.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-05-27 21:34:05 +0200
committerpolo <ordipolo@gmx.fr>2024-05-27 21:34:05 +0200
commit46591fffb0226b0fa87e68248b06182389825f80 (patch)
tree32ff8fa73253a1d405854a09d6378ad0bb5b8eab /src/model/Clients.php
parentd38caea1a79329c7c1c94245bde9712a6075df9d (diff)
downloadAppliGestionPHP-46591fffb0226b0fa87e68248b06182389825f80.zip
typeToClient() modifie $Client et ne touche la base que si nécessaire, nettoyage divers
Diffstat (limited to 'src/model/Clients.php')
-rw-r--r--src/model/Clients.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/model/Clients.php b/src/model/Clients.php
index a5cc276..0f70eb6 100644
--- a/src/model/Clients.php
+++ b/src/model/Clients.php
@@ -124,6 +124,18 @@ class Clients extends Model
124 $this->type = (string) $value; 124 $this->type = (string) $value;
125 return $this; 125 return $this;
126 } 126 }
127 public function typeToClient(): bool
128 {
129 if($this->type != 'client')
130 {
131 $this->type = 'client';
132 return true;
133 }
134 else
135 {
136 return false;
137 }
138 }
127 139
128 140
129 public function findByKeywords(array $keywords, string $field): array // n'hydrate pas les variables, on doit choisir un client et hydrater ensuite 141 public function findByKeywords(array $keywords, string $field): array // n'hydrate pas les variables, on doit choisir un client et hydrater ensuite