--- /dev/null
+<?php\r
+\r
+ require_once('protected/required.php');\r
+\r
+ class Exploitant {\r
+\r
+ protected $id, $nom, $reference, $produits;\r
+ \r
+ /// CONSTRUCTEUR\r
+ function __construct($id = null, $nom = null, $reference = null, $produits = null) {\r
+\r
+ $this -> id = $id;\r
+ $this -> nom = $nom;\r
+ $this -> reference = $reference;\r
+ $this -> produits = $produits;\r
+\r
+ }\r
+\r
+ public function getJSON() {\r
+ return json_encode(get_object_vars($this));\r
+ }\r
+ \r
+ public function getJSONP() {\r
+ $array["id"] = $this -> id;\r
+ $array["nom"] = $this -> nom;\r
+ $array["reference"] = $this -> reference;\r
+ $array["produits"] = $this -> produits;\r
+\r
+ return json_encode($array);\r
+ }\r
+\r
+ /// GETTERS\r
+ public function getId() { return $this -> id; }\r
+ public function getNom() { return $this->nom; }\r
+ public function getReference() { return $this->reference; }\r
+ public function getProduits() { return $this->produits; }\r
+ \r
+ /// SETTERS\r
+ public function setId($id) { $this -> id = $id; }\r
+ public function setNom($nom) { $this->nom = $nom; }\r
+ public function setReference($reference) { $this->reference = $reference; }\r
+ public function setProduits($produits) { $this->produits = $produits; }\r
+\r
+ }\r
+\r
+?>
\ No newline at end of file