ILIAS
Release_5_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
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
{
16
$a_value = null;
17
}
18
if
($a_value !== null)
19
{
20
// round?
21
$a_value = (int)$a_value;
22
}
23
return
$a_value;
24
}
25
26
public
function
getMin
()
27
{
28
return
$this->min;
29
}
30
31
public
function
setMin
($a_value)
32
{
33
$this->min = $this->
handleNumber
($a_value);
34
}
35
36
public
function
getMax
()
37
{
38
return
$this->max;
39
}
40
41
public
function
setMax
($a_value)
42
{
43
$this->max = $this->
handleNumber
($a_value);
44
}
45
46
public
function
getSuffix
()
47
{
48
return
$this->suffix
;
49
}
50
51
public
function
setSuffix
($a_value)
52
{
53
$this->suffix = trim($a_value);
54
}
55
56
57
// comparison
58
59
public
function
isComparableTo
(
ilADT
$a_adt)
60
{
61
// has to be number-based
62
return
($a_adt instanceof
ilADTInteger
);
63
}
64
}
65
66
?>
Services
ADT
classes
Types
Integer
class.ilADTIntegerDefinition.php
Generated on Wed Apr 27 2016 21:01:28 for ILIAS by
1.8.1.2 (using
Doxyfile
)