diff --git a/TP4/ex1/models/Objet.php b/TP4/ex1/models/Objet.php
index 193f198e2ca8ae1128035fbfe7864d4686e3766c..28c122325cdc9b7e41661e22ab2b031059f4a91e 100644
--- a/TP4/ex1/models/Objet.php
+++ b/TP4/ex1/models/Objet.php
@@ -6,6 +6,14 @@ require_once "Objet.php";
  */
 class Objet
 {
+    public function __construct($data = null)
+    {
+        if(!is_null($data)){
+            foreach ($data as $key => $value){
+                $this->$key = $value;
+            }
+        }
+    }
     /**
      * @param $name
      * @return mixed