source: Dev/trunk/classes/SurveyResults.php @ 75

Last change on this file since 75 was 75, checked in by fpvanagthoven, 14 years ago

Application should now just be RDF-saved. Beginning on DashboardTool?.php.

File size: 778 bytes
Line 
1<?php
2
3class ResultType
4{
5        /* possible types */
6        const TEXT = 0;                         // string
7        const INTEGER = 1;                      // int
8        const MULTIPLE_CHOICE = 2;  // string
9        const CHECKBOXES = 3;           // array
10        const SCALE = 4;                        // int
11}
12
13/**
14 * 1 Results per Survey
15 *
16 * @author Frans
17 */
18class SurveyResults
19{
20        private $questionResults;
21
22        public function __construct()
23        {
24                $this->questionResults = array();
25        }
26
27        public function addQuestionResult($result)
28        {
29                array_push($this->questionResults, $result);
30        }
31       
32        public function getQuestionResults()
33        {
34                return $this->questionResults;
35        }
36       
37}
38
39/**
40 * A Result per question
41 */
42class QuestionResult
43{
44        private $type;
45        private $answers; // array
46
47        public function __construct($type, $answers)
48        {
49                $this->type = $type;
50                $this->answers = $answers;
51        }
52}
53
54?>
Note: See TracBrowser for help on using the repository browser.