diff options
| author | polo <ordipolo@gmx.fr> | 2022-12-28 05:19:55 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2022-12-28 05:19:55 +0100 |
| commit | 1894fc377e6b938ea34df9980567a1634ec6ef48 (patch) | |
| tree | 812db64208797ecbdabbc9673a5247fbc18ebf8b /src/model/traits.php | |
| parent | 7d564efbccc4b361d2fa2db2902fb35882304aae (diff) | |
| download | AppliGestionPHP-1894fc377e6b938ea34df9980567a1634ec6ef48.tar.gz AppliGestionPHP-1894fc377e6b938ea34df9980567a1634ec6ef48.tar.bz2 AppliGestionPHP-1894fc377e6b938ea34df9980567a1634ec6ef48.zip | |
réorganisation + bientôt finie la section 1
Diffstat (limited to 'src/model/traits.php')
| -rw-r--r-- | src/model/traits.php | 18 |
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 | ||
| 4 | trait ModelChildren // pour ne pas toucher au constructeur de la classe Model | 4 | trait 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 | } |
