ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
assAnswerMatchingTerm Class Reference

Class for matching question terms. More...

+ Inheritance diagram for assAnswerMatchingTerm:
+ Collaboration diagram for assAnswerMatchingTerm:

Public Member Functions

 __construct ($text="", $picture="", $identifier="")
 assAnswerMatchingTerm constructor More...
 
 __get ($value)
 Object getter. More...
 
 __set ($key, $value)
 Object setter. More...
 

Protected Attributes

 $arrData
 

Detailed Description

Class for matching question terms.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 11 of file class.assAnswerMatchingTerm.php.

Constructor & Destructor Documentation

◆ __construct()

assAnswerMatchingTerm::__construct (   $text = "",
  $picture = "",
  $identifier = "" 
)

assAnswerMatchingTerm constructor

Parameters
string$textDefinition text
string$pictureDefinition picture
integer$identifierRandom number identifier

Definition at line 22 of file class.assAnswerMatchingTerm.php.

23 {
24 if (strlen($identifier) == 0)
25 {
26 mt_srand((double)microtime()*1000000);
27 $identifier = mt_rand(1, 100000);
28 }
29 $this->arrData = array(
30 'text' => $text,
31 'picture' => $picture,
32 'identifier' => $identifier
33 );
34 }
$text

References $text.

Member Function Documentation

◆ __get()

assAnswerMatchingTerm::__get (   $value)

Object getter.

Definition at line 39 of file class.assAnswerMatchingTerm.php.

40 {
41 switch ($value)
42 {
43 case "text":
44 case "picture":
45 if (strlen($this->arrData[$value]))
46 {
47 return $this->arrData[$value];
48 }
49 else
50 {
51 return null;
52 }
53 break;
54 case "identifier":
55 return $this->arrData[$value];
56 break;
57 default:
58 return null;
59 break;
60 }
61 }

◆ __set()

assAnswerMatchingTerm::__set (   $key,
  $value 
)

Object setter.

Definition at line 66 of file class.assAnswerMatchingTerm.php.

67 {
68 switch ($key)
69 {
70 case "text":
71 case "picture":
72 case "identifier":
73 $this->arrData[$key] = $value;
74 break;
75 default:
76 break;
77 }
78 }

Field Documentation

◆ $arrData

assAnswerMatchingTerm::$arrData
protected

Definition at line 13 of file class.assAnswerMatchingTerm.php.


The documentation for this class was generated from the following file: