ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSurveyCategory.php
Go to the documentation of this file.
1 <?php
2 
26 {
28  private array $arrData;
29 
30  public function __construct(
31  ?string $title = null,
32  int $other = 0,
33  int $neutral = 0,
34  ?string $label = null,
35  ?int $scale = null
36  ) {
37  $this->arrData = array(
38  "title" => $title,
39  "other" => $other,
40  "neutral" => $neutral,
41  "label" => $label,
42  "scale" => $scale
43  );
44  }
45 
50  public function __get(string $value)
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  }
60 
66  public function __set(string $key, $value): void
67  {
68  switch ($key) {
69  default:
70  $this->arrData[$key] = $value;
71  break;
72  }
73  }
74 }
__set(string $key, $value)
string $key
Consumer key/client ID value.
Definition: System.php:193
__construct(?string $title=null, int $other=0, int $neutral=0, ?string $label=null, ?int $scale=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...