. */ /** * The disability, representing an object in MySQL. */ require_once(FILESYSTEMROOTPATH."include/model/AbstractMySQL.php"); class Disability extends AbstractMySQL { /** id */ private $id; /** Name */ private $name; /** Active */ private $active; /** Description */ private $description; /** * Constructor */ public function __construct($data) { parent::__construct($data); if( is_array($data) ) { $this->name = $data['name']; $this->id = $data['id']; $this->active = $data['active']; $this->description = $data['description']; }else { $this->name = ""; $this->id = ""; $this->active = ""; $this->description = ""; } } /** * Destructor */ public function __destruct() { } /** * toString method */ public function __toString() { $r = "Id: ".$this->getId()."; "; $r .= "Name: ".$this->getName()."; "; $r .= "Active: ".$this->getActive()."."; $r .= "Description: ".$this->getDescription()."."; return $r; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function getId() { return $this->id; } public function setId($id) { $this->id = $id; } public function getActive() { return $this->active; } public function setActive($active) { $this->active = $active; } public function getDescription() { return $this->description; } public function setDescription($description) { $this->description = $description; } } ?>