. */ require_once(FILESYSTEMROOTPATH."include/model/AbstractMySQL.php"); class Ballots extends AbstractMySQL { /** id */ private $id; /*unique code [per elections?] for checking votes by voters*/ private $ticket; /** elections id */ private $election_id; /** id of the candidate*/ private $candidate_id; /* constructor*/ public function __construct($data) { parent::__construct($data); if( is_array($data) ) { $this->id = $data['id']; $this->election_id = $data['election_id']; $this->candidate_id = $data['candidate_id']; $this->ticket = $data['ticket']; } else { $this->id = ''; $this->candidate_id = ''; $this->election_id = ''; $this->ticket = ''; } } public function getId() { return $this->id; } public function setId($id) { $this->id = $id; } public function getCandidate_id() { return $this->candidate_id; } public function setCandidate_id($candidate_id) { $this->candidate_id = $candidate_id; } public function getElection_id() { return $this->election_id; } public function setElection_id($election_id) { $this->election_id = $election_id; } public function getTicket() { return $this->ticket; } public function setTicket($ticket) { $this->ticket = $ticket; } } ?>