+++ /dev/null
-<?php
-
- require_once('protected/required.php');
-
- class Manager {
-
- protected $id, $name, $APId, $appliances;
-
- /// CONSTRUCTOR
- function __construct($id = null, $name = null, $APId = null, $appliances = null) {
-
- $this -> id = $id;
- $this -> name = $name;
- $this -> APId = $APId;
- $this -> appliances = $appliances;
-
- }
-
- public function getJSON() {
- return json_encode(get_object_vars($this));
- }
-
- public function getJSONP() {
- $array["id"] = $this -> id;
- $array["name"] = $this -> name;
- $array["APId"] = $this -> APId;
- $array["appliances"] = $this -> appliances;
-
- return json_encode($array);
- }
-
- /// GETTERS
- public function getId() { return $this -> id; }
- public function getName() { return $this->name; }
- public function getAPId() { return $this->APId; }
- public function getAppliances() { return $this->appliances; }
-
- /// SETTERS
- public function setId($id) { $this -> id = $id; }
- public function setName($name) { $this->name = $name; }
- public function setAPId($APId) { $this->APId = $APId; }
- public function setAppliances($appliances) { $this->appliances = $appliances; }
-
- }
-
-?>
\ No newline at end of file