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