ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
}
ilADTIntegerDefinition\$max_value
$max_value
Definition:
class.ilADTIntegerDefinition.php:6
ilADTIntegerDefinition\$min_value
$min_value
Definition:
class.ilADTIntegerDefinition.php:5
ilADTIntegerDefinition\setSuffix
setSuffix($a_value)
Definition:
class.ilADTIntegerDefinition.php:49
ilADTIntegerDefinition
Definition:
class.ilADTIntegerDefinition.php:3
ilADTInteger
Definition:
class.ilADTInteger.php:3
ilADTIntegerDefinition\getMax
getMax()
Definition:
class.ilADTIntegerDefinition.php:34
ilADT
ADT base class.
Definition:
class.ilADT.php:11
ilADTIntegerDefinition\getMin
getMin()
Definition:
class.ilADTIntegerDefinition.php:24
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
php
ilADTDefinition
ADT definition base class.
Definition:
class.ilADTDefinition.php:11
ilADTIntegerDefinition\getSuffix
getSuffix()
Definition:
class.ilADTIntegerDefinition.php:44
ilADTIntegerDefinition\setMax
setMax($a_value)
Definition:
class.ilADTIntegerDefinition.php:39
ilADTIntegerDefinition\isComparableTo
isComparableTo(ilADT $a_adt)
Definition:
class.ilADTIntegerDefinition.php:57
Services
ADT
classes
Types
Integer
class.ilADTIntegerDefinition.php
Generated on Thu Jan 16 2025 19:02:16 for ILIAS by
1.8.13 (using
Doxyfile
)