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

Survey category class. More...

+ Collaboration diagram for ilSurveyCategory:

Public Member Functions

 __construct ( $title=null, $other=0, $neutral=0, $label=null, $scale=null)
 ilSurveyPhrases constructor More...
 
 __get ($value)
 Object getter. More...
 
 __set ($key, $value)
 Object setter. More...
 

Private Attributes

 $arrData
 

Detailed Description

Survey category class.

The ilSurveyCategory class encapsules a survey category

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 33 of file class.ilSurveyCategory.php.

Constructor & Destructor Documentation

◆ __construct()

ilSurveyCategory::__construct (   $title = null,
  $other = 0,
  $neutral = 0,
  $label = null,
  $scale = null 
)

ilSurveyPhrases constructor

Definition at line 40 of file class.ilSurveyCategory.php.

48 {
49 $this->arrData = array(
50 "title" => $title,
51 "other" => $other,
52 "neutral" => $neutral,
53 "label" => $label,
54 "scale" => $scale
55 );
56 }

Member Function Documentation

◆ __get()

ilSurveyCategory::__get (   $value)

Object getter.

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

62 {
63 switch ($value)
64 {
65 case 'other':
66 case 'neutral':
67 return ($this->arrData[$value]) ? 1 : 0;
68 break;
69 default:
70 if (array_key_exists($value, $this->arrData))
71 {
72 return $this->arrData[$value];
73 }
74 else
75 {
76 return null;
77 }
78 break;
79 }
80 }

◆ __set()

ilSurveyCategory::__set (   $key,
  $value 
)

Object setter.

Definition at line 85 of file class.ilSurveyCategory.php.

86 {
87 switch ($key)
88 {
89 default:
90 $this->arrData[$key] = $value;
91 break;
92 }
93 }

Field Documentation

◆ $arrData

ilSurveyCategory::$arrData
private

Definition at line 35 of file class.ilSurveyCategory.php.


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