summaryrefslogtreecommitdiff
path: root/src/model/traits.php
diff options
context:
space:
mode:
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}