ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
class.ilADTIntegerDefinition.php
Go to the documentation of this file.
1
<?
php
2
3
class
ilADTIntegerDefinition
extends
ilADTDefinition
4
{
5
protected
$min_value
;
// [int]
6
protected
$max_value
;
// [int]
7
protected
$suffix
;
// [string]
8
9
10
// properties
11
12
public
function
handleNumber
($a_value)
13
{
14
if
(!is_numeric($a_value)) {
15
$a_value =
null
;
16
}
17
if
($a_value !==
null
) {
18
// round?
19
$a_value = (int) $a_value;
20
}
21
return
$a_value;
22
}
23
24
public
function
getMin
()
25
{
26
return
$this->min;
27
}
28
29
public
function
setMin
($a_value)
30
{
31
$this->min = $this->
handleNumber
($a_value);
32
}
33
34
public
function
getMax
()
35
{
36
return
$this->max;
37
}
38
39
public
function
setMax
($a_value)
40
{
41
$this->max = $this->
handleNumber
($a_value);
42
}
43
44
public
function
getSuffix
()
45
{
46
return
$this->suffix
;
47
}
48
49
public
function
setSuffix
($a_value)
50
{
51
$this->suffix = trim($a_value);
52
}
53
54
55
// comparison
56
57
public
function
isComparableTo
(
ilADT
$a_adt)
58
{
59
// has to be number-based
60
return
($a_adt instanceof
ilADTInteger
);
61
}
62
}
php
An exception for terminatinating execution or to throw for unit testing.
ilADTDefinition
ADT definition base class.
Definition:
class.ilADTDefinition.php:12
ilADTIntegerDefinition
Definition:
class.ilADTIntegerDefinition.php:4
ilADTIntegerDefinition\setMax
setMax($a_value)
Definition:
class.ilADTIntegerDefinition.php:39
ilADTIntegerDefinition\getMax
getMax()
Definition:
class.ilADTIntegerDefinition.php:34
ilADTIntegerDefinition\setSuffix
setSuffix($a_value)
Definition:
class.ilADTIntegerDefinition.php:49
ilADTIntegerDefinition\$max_value
$max_value
Definition:
class.ilADTIntegerDefinition.php:6
ilADTIntegerDefinition\getMin
getMin()
Definition:
class.ilADTIntegerDefinition.php:24
ilADTIntegerDefinition\$min_value
$min_value
Definition:
class.ilADTIntegerDefinition.php:5
ilADTIntegerDefinition\handleNumber
handleNumber($a_value)
Definition:
class.ilADTIntegerDefinition.php:12
ilADTIntegerDefinition\setMin
setMin($a_value)
Definition:
class.ilADTIntegerDefinition.php:29
ilADTIntegerDefinition\$suffix
$suffix
Definition:
class.ilADTIntegerDefinition.php:7
ilADTIntegerDefinition\isComparableTo
isComparableTo(ilADT $a_adt)
Check if given ADT is comparable to self.
Definition:
class.ilADTIntegerDefinition.php:57
ilADTIntegerDefinition\getSuffix
getSuffix()
Definition:
class.ilADTIntegerDefinition.php:44
ilADTInteger
Definition:
class.ilADTInteger.php:4
ilADT
ADT base class.
Definition:
class.ilADT.php:12
Services
ADT
classes
Types
Integer
class.ilADTIntegerDefinition.php
Generated on Fri Oct 3 2025 21:00:54 for ILIAS by
1.9.4 (using
Doxyfile
)