+++ /dev/null
-<?php\r
-\r
- require_once('protected/required.php');\r
-\r
- class Usager {\r
-\r
- protected $id, $nom, $reference;\r
- \r
- /// CONSTRUCTEUR\r
- function __construct($id = null, $nom = null, $reference = null) {\r
-\r
- $this -> id = $id;\r
- $this -> nom = $nom;\r
- $this -> reference = $reference;\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
- \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
- \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
-\r
- }\r
-\r
-?>
\ No newline at end of file