ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
class.ilSurveyCategory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
28{
30 private array $arrData;
31
32 public function __construct(
33 ?string $title = null,
34 int $other = 0,
35 int $neutral = 0,
36 ?string $label = null,
37 ?int $scale = null
38 ) {
39 $this->arrData = array(
40 "title" => $title,
41 "other" => $other,
42 "neutral" => $neutral,
43 "label" => $label,
44 "scale" => $scale
45 );
46 }
47
52 public function __get(string $value)
53 {
54 switch ($value) {
55 case 'other':
56 case 'neutral':
57 return ($this->arrData[$value]) ? 1 : 0;
58 default:
59 return $this->arrData[$value] ?? null;
60 }
61 }
62
68 public function __set(string $key, $value): void
69 {
70 switch ($key) {
71 default:
72 $this->arrData[$key] = $value;
73 break;
74 }
75 }
76}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__set(string $key, $value)
__construct(?string $title=null, int $other=0, int $neutral=0, ?string $label=null, ?int $scale=null)