ILIAS  release_8 Revision v8.23
class.ilQTIDecvar.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
31 {
32  public const VARTYPE_INTEGER = "1";
33  public const VARTYPE_STRING = "2";
34  public const VARTYPE_DECIMAL = "3";
35  public const VARTYPE_SCIENTIFIC = "4";
36  public const VARTYPE_BOOLEAN = "5";
37  public const VARTYPE_ENUMERATED = "6";
38  public const VARTYPE_SET = "7";
39 
40  public ?string $varname = null;
41  public ?string $vartype = null;
42  public ?string $defaultval = null;
43  public ?string $minvalue = null;
44  public ?string $maxvalue = null;
45  public ?string $members = null;
46  public ?string $cutvalue = null;
47  public ?string $content = null;
48 
49  public function setVarname(string $a_varname): void
50  {
51  $this->varname = $a_varname;
52  }
53 
54  public function getVarname(): ?string
55  {
56  return $this->varname;
57  }
58 
59  public function setVartype(string $a_vartype): void
60  {
61  switch (strtolower($a_vartype)) {
62  case "integer":
63  case "1":
64  $this->vartype = self::VARTYPE_INTEGER;
65  break;
66  case "string":
67  case "2":
68  $this->vartype = self::VARTYPE_STRING;
69  break;
70  case "decimal":
71  case "3":
72  $this->vartype = self::VARTYPE_DECIMAL;
73  break;
74  case "scientific":
75  case "4":
76  $this->vartype = self::VARTYPE_SCIENTIFIC;
77  break;
78  case "boolean":
79  case "5":
80  $this->vartype = self::VARTYPE_BOOLEAN;
81  break;
82  case "enumerated":
83  case "6":
84  $this->vartype = self::VARTYPE_ENUMERATED;
85  break;
86  case "set":
87  case "7":
88  $this->vartype = self::VARTYPE_SET;
89  break;
90  }
91  }
92 
93  public function getVartype(): ?string
94  {
95  return $this->vartype;
96  }
97 
98  public function setDefaultval(string $a_defaultval): void
99  {
100  $this->defaultval = $a_defaultval;
101  }
102 
103  public function getDefaultval(): ?string
104  {
105  return $this->defaultval;
106  }
107 
108  public function setMinvalue(string $a_minvalue): void
109  {
110  $this->minvalue = $a_minvalue;
111  }
112 
113  public function getMinvalue(): ?string
114  {
115  return $this->minvalue;
116  }
117 
118  public function setMaxvalue(string $a_maxvalue): void
119  {
120  $this->maxvalue = $a_maxvalue;
121  }
122 
123  public function getMaxvalue(): ?string
124  {
125  return $this->maxvalue;
126  }
127 
128  public function setMembers(string $a_members): void
129  {
130  $this->members = $a_members;
131  }
132 
133  public function getMembers(): ?string
134  {
135  return $this->members;
136  }
137 
138  public function setCutvalue(string $a_cutvalue): void
139  {
140  $this->cutvalue = $a_cutvalue;
141  }
142 
143  public function getCutvalue(): ?string
144  {
145  return $this->cutvalue;
146  }
147 
148  public function setContent(string $a_content): void
149  {
150  $this->content = $a_content;
151  }
152 
153  public function getContent(): ?string
154  {
155  return $this->content;
156  }
157 }
setCutvalue(string $a_cutvalue)
setMinvalue(string $a_minvalue)
setMaxvalue(string $a_maxvalue)
const VARTYPE_SCIENTIFIC
const VARTYPE_ENUMERATED
setVartype(string $a_vartype)
setDefaultval(string $a_defaultval)
setContent(string $a_content)
setMembers(string $a_members)
setVarname(string $a_varname)