ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSurveyCategory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilSurveyCategory:

Public Member Functions

 __construct (?string $title=null, int $other=0, int $neutral=0, ?string $label=null, ?int $scale=null)
 
 __get (string $value)
 
 __set (string $key, $value)
 

Private Attributes

array $arrData
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Survey category class The ilSurveyCategory class encapsules a survey category

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Todo:
make a proper dto, get rid of magic functions

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

Constructor & Destructor Documentation

◆ __construct()

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

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

36 {
37 $this->arrData = array(
38 "title" => $title,
39 "other" => $other,
40 "neutral" => $neutral,
41 "label" => $label,
42 "scale" => $scale
43 );
44 }

Member Function Documentation

◆ __get()

ilSurveyCategory::__get ( string  $value)
Parameters
string$value
Returns
mixed

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

51 {
52 switch ($value) {
53 case 'other':
54 case 'neutral':
55 return ($this->arrData[$value]) ? 1 : 0;
56 default:
57 return $this->arrData[$value] ?? null;
58 }
59 }

◆ __set()

ilSurveyCategory::__set ( string  $key,
  $value 
)
Parameters
string$key
mixed$value
Returns
void

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

66 : void
67 {
68 switch ($key) {
69 default:
70 $this->arrData[$key] = $value;
71 break;
72 }
73 }

Field Documentation

◆ $arrData

array ilSurveyCategory::$arrData
private

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


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