Changeset 138 for Dev


Ignore:
Timestamp:
10/24/11 16:33:44 (14 years ago)
Author:
jkraaijeveld
Message:

Now has Survey support

Location:
Dev/branches/jos-branch
Files:
7 added
1 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • Dev/branches/jos-branch/classes/DatabaseInterface.php

    r130 r138  
    2020    private $questionConnector;
    2121    private $userConnector;
     22    private $surveyConnector;
    2223   
    2324    /**
     
    2930        $this->questionConnector = new QuestionConnector();
    3031        $this->userConnector = new UserConnector();
     32        $this->surveyConnector = new SurveyConnector();
    3133    }
    3234   
     
    5052                return $this->userConnector->get($arguments);
    5153                break;
     54            case "survey":
     55                return $this->surveyConnector->get($arguments);
    5256        }
    5357    }
     
    7074                $this->userConnector->set($rToolObject);
    7175                break;
     76            case "Survey":
     77                $this->surveyConnector->set($rToolObject);
    7278        }
    7379    }
  • Dev/branches/jos-branch/testpage.php

    r132 r138  
    33
    44    $db = new DatabaseInterface();
    5     $result = $db->get("user", array("name" => "jkraaijeveld"));
     5    $result = $db->get("survey", array("questions" => array("q4")));
    66    print_r($result);
    7    
    8     // Create new application and save it in database
    9     $newApp = new Application(null, "Titel", "Beschrijving", "Stijl");
    10     $db->set(newApp);
    11    
    12     //Retrieve all Questions
    13     $results = $db->get("question", array());
    14    
    15     //Batchsave all results
    16     $db->set($results);
    177?>
Note: See TracChangeset for help on using the changeset viewer.