ILIAS  release_7 Revision v7.30-3-g800a261c036
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.

41 {
42 $this->arrData = array(
43 "title" => $title,
44 "other" => $other,
45 "neutral" => $neutral,
46 "label" => $label,
47 "scale" => $scale
48 );
49 }

Member Function Documentation

◆ __get()

ilSurveyCategory::__get (   $value)

Object getter.

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

55 {
56 switch ($value) {
57 case 'other':
58 case 'neutral':
59 return ($this->arrData[$value]) ? 1 : 0;
60 break;
61 default:
62 if (array_key_exists($value, $this->arrData)) {
63 return $this->arrData[$value];
64 } else {
65 return null;
66 }
67 break;
68 }
69 }

◆ __set()

ilSurveyCategory::__set (   $key,
  $value 
)

Object setter.

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

75 {
76 switch ($key) {
77 default:
78 $this->arrData[$key] = $value;
79 break;
80 }
81 }

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: