1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4/**
5* Class for matching question pairs
6*
7* @author		Helmut Schottmüller <helmut.schottmueller@mac.com>
8* @version	$Id$
9* @ingroup ModulesTestQuestionPool
10*/
11class assAnswerMatchingPair
12{
13    protected $arrData;
14
15    /**
16    * assAnswerMatchingPair constructor
17    *
18    * @param string $text Definition text
19    * @param string $picture Definition picture
20    * @param integer $identifier Random number identifier
21    */
22    public function __construct($term = null, $definition = null, $points = 0.0)
23    {
24        $this->arrData = array(
25            'term' => $term,
26            'definition' => $definition,
27            'points' => $points
28        );
29    }
30
31    /**
32    * Object getter
33    */
34    public function __get($value)
35    {
36        switch ($value) {
37            case "term":
38            case "definition":
39            case "points":
40                return $this->arrData[$value];
41                break;
42            default:
43                return null;
44                break;
45        }
46    }
47
48    /**
49    * Object setter
50    */
51    public function __set($key, $value)
52    {
53        switch ($key) {
54            case "term":
55            case "definition":
56            case "points":
57                $this->arrData[$key] = $value;
58                break;
59            default:
60                break;
61        }
62    }
63}
64