summaryrefslogtreecommitdiff
path: root/src/model/traits.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2022-12-28 05:19:55 +0100
committerpolo <ordipolo@gmx.fr>2022-12-28 05:19:55 +0100
commit1894fc377e6b938ea34df9980567a1634ec6ef48 (patch)
tree812db64208797ecbdabbc9673a5247fbc18ebf8b /src/model/traits.php
parent7d564efbccc4b361d2fa2db2902fb35882304aae (diff)
downloadAppliGestionPHP-1894fc377e6b938ea34df9980567a1634ec6ef48.zip
réorganisation + bientôt finie la section 1
Diffstat (limited to 'src/model/traits.php')
-rw-r--r--src/model/traits.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/model/traits.php b/src/model/traits.php
index 43d9b7f..3d446c1 100644
--- a/src/model/traits.php
+++ b/src/model/traits.php
@@ -3,14 +3,14 @@
3 3
4trait ModelChildren // pour ne pas toucher au constructeur de la classe Model 4trait ModelChildren // pour ne pas toucher au constructeur de la classe Model
5{ 5{
6 public function __construct() 6 //~ public function __construct()
7 { 7 //~ {
8 $this->table = strtolower(__CLASS__); 8 //~ $this->table = strtolower(__CLASS__);
9 } 9 //~ }
10 10
11 public function setIdFromLastInsertID() // à faire juste après l'écriture d'une nouvelle entrée 11 //~ public function setIdFromLastInsertID() // à faire juste après l'écriture d'une nouvelle entrée
12 { 12 //~ {
13 $this->db = parent::getInstance(); 13 //~ $this->db = parent::getInstance();
14 $this->ID = $this->db->lastInsertId(); // méthode de PDO 14 //~ $this->ID = $this->db->lastInsertId(); // méthode de PDO
15 } 15 //~ }
16} 16}