ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

References $text, and array.

23  {
24  if (strlen($identifier) == 0) {
25  mt_srand((double) microtime()*1000000);
26  $identifier = mt_rand(1, 100000);
27  }
28  $this->arrData = array(
29  'text' => $text,
30  'picture' => $picture,
31  'identifier' => $identifier
32  );
33  }
$text
Definition: errorreport.php:18
Create styles array
The data for the language used.

Member Function Documentation

◆ __get()

assAnswerMatchingTerm::__get (   $value)

Object getter.

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

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

◆ __set()

assAnswerMatchingTerm::__set (   $key,
  $value 
)

Object setter.

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

References $key.

62  {
63  switch ($key) {
64  case "text":
65  case "picture":
66  case "identifier":
67  $this->arrData[$key] = $value;
68  break;
69  default:
70  break;
71  }
72  }
$key
Definition: croninfo.php:18

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: