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

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

Start at SessionCreationTool?.

File size: 557 bytes
Line 
1<?php
2
3/**
4 * Helper class to load stuff
5 *
6 * @author fpvanagthoven
7 */
8class Loader {
9
10    /**
11     *
12     * @return array Array of Surveys with id and title
13     */
14    public static function loadSurveys() {
15        $surveys = array();
16
17        $surveyDBI = new SurveyDatabaseInterface(null);
18        $surveyIDTitles = $surveyDBI->getExistingSurveys();
19
20        foreach ($surveyIDTitles as $id => $title) {
21            $survey = new Survey($id, $title);
22            array_push($surveys, $survey);
23        }
24       
25        return $surveys;
26    }
27
28}
29
30?>
Note: See TracBrowser for help on using the repository browser.