-<?php\r
-\r
- require_once('protected/required.php');\r
-\r
- class Produit {\r
-\r
- protected $id, $nom, $exploitant, $reference, $version, $historique;\r
- \r
- /// CONSTRUCTEUR\r
- function __construct($id = null, $nom = null, $exploitant = null, $reference = null, $version = null, $historique = null) {\r
-\r
- $this -> id = $id;\r
- $this -> nom = $nom;\r
- // Référence client de l'exploitant\r
- $this -> exploitant = $exploitant;\r
- // Référence / identifiant du produit\r
- $this -> reference = $reference;\r
- // Version actuelle\r
- $this -> version = $version;\r
- // Id de l'historique de màj / patchs\r
- $this -> historique = $historique;\r
-\r
- // TO-DO : AJOUT DE :\r
- /*\r
- - fqdnInterne\r
- - fqdnExterne\r
- - systeme\r
- - uid\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["exploitant"] = $this -> exploitant;\r
- $array["reference"] = $this -> reference;\r
- $array["version"] = $this -> version;\r
- $array["historique"] = $this -> historique;\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 getExploitant() { return $this->exploitant; }\r
- public function getReference() { return $this->reference; }\r
- public function getVersion() { return $this->version; }\r
- public function getHistorique() { return $this->historique; }\r
- \r
- /// SETTERS\r
- public function setId($id) { $this -> id = $id; }\r
- public function setNom($nom) { $this->nom = $nom; }\r
- public function setExploitant($exploitant) { $this->exploitant = $exploitant; }\r
- public function setReference($reference) { $this->reference = $reference; }\r
- public function setVersion($version) { $this->version = $version; }\r
- public function setHistorique($historique) { $this->historique = $historique; }\r
-\r
- }\r
-\r
+<?php
+
+ require_once('protected/required.php');
+
+ class Produit {
+
+ protected $id, $nom;
+
+ /// CONSTRUCTEUR
+ function __construct($id = null, $nom = null) {
+
+ $this -> id = $id;
+ $this -> nom = $nom;
+
+ }
+
+ public function getJSON() {
+ return json_encode(get_object_vars($this));
+ }
+
+ public function getJSONP() {
+ $array["id"] = $this -> id;
+ $array["nom"] = $this -> nom;
+
+ return json_encode($array);
+ }
+
+ /// GETTERS
+ public function getId() { return $this -> id; }
+ public function getNom() { return $this->nom; }
+
+ /// SETTERS
+ public function setId($id) { $this -> id = $id; }
+ public function setNom($nom) { $this->nom = $nom; }
+
+ }
+
?>
\ No newline at end of file