Ignore:
Timestamp:
09/19/11 16:29:02 (14 years ago)
Author:
fpvanagthoven
Message:

Code to get questions and put them in objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/Question.php

    r98 r112  
    1111 * @author fpvanagthoven
    1212 */
    13 class Question {
    14     public $id;
     13class Question {   
    1514    public $code;
    1615    public $title;
     
    1817    public $description;
    1918    public $answers; // format answers['#']
     19    public $category;
    2020   
    21     public function __construct($id, $code, $title, $type, $description = null)
     21    public function __construct($code, $title, $type = null, $description = null)
    2222    {
    23         $this->id = $id;
    2423        $this->code = $code;
    2524        $this->title = $title;
     
    2827        $this->answers = array();
    2928    }
     29   
     30    /* reminder that constructor doesn't contain category haha */
     31    public function setCategory($category)
     32    {
     33        $this->category = $category;
     34    }
     35   
     36    public static function getQuestion($questionInfo)
     37    {
     38       
     39    }
    3040
    3141}
Note: See TracChangeset for help on using the changeset viewer.