ILIAS  release_7 Revision v7.30-3-g800a261c036
ilADTIntegerDefinition Class Reference
+ Inheritance diagram for ilADTIntegerDefinition:
+ Collaboration diagram for ilADTIntegerDefinition:

Public Member Functions

 handleNumber ($a_value)
 
 getMin ()
 
 setMin ($a_value)
 
 getMax ()
 
 setMax ($a_value)
 
 getSuffix ()
 
 setSuffix ($a_value)
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 
- Public Member Functions inherited from ilADTDefinition
 __construct ()
 Constructor. More...
 
 getType ()
 Get type (from class/instance) More...
 
 setAllowNull ($a_value)
 Toggle null allowed status. More...
 
 isNullAllowed ()
 Is null currently allowed. More...
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 

Protected Attributes

 $min_value
 
 $max_value
 
 $suffix
 
- Protected Attributes inherited from ilADTDefinition
 $allow_null
 

Additional Inherited Members

- Protected Member Functions inherited from ilADTDefinition
 reset ()
 Init property defaults. More...
 

Detailed Description

Definition at line 3 of file class.ilADTIntegerDefinition.php.

Member Function Documentation

◆ getMax()

ilADTIntegerDefinition::getMax ( )

Definition at line 34 of file class.ilADTIntegerDefinition.php.

35 {
36 return $this->max;
37 }

◆ getMin()

ilADTIntegerDefinition::getMin ( )

Definition at line 24 of file class.ilADTIntegerDefinition.php.

25 {
26 return $this->min;
27 }

◆ getSuffix()

ilADTIntegerDefinition::getSuffix ( )

Definition at line 44 of file class.ilADTIntegerDefinition.php.

References $suffix.

◆ handleNumber()

ilADTIntegerDefinition::handleNumber (   $a_value)

Reimplemented in ilADTFloatDefinition.

Definition at line 12 of file class.ilADTIntegerDefinition.php.

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 }

Referenced by setMax(), and setMin().

+ Here is the caller graph for this function:

◆ isComparableTo()

ilADTIntegerDefinition::isComparableTo ( ilADT  $a_adt)

Check if given ADT is comparable to self.

Parameters
ilADT$a_adt
Returns
bool

Reimplemented from ilADTDefinition.

Definition at line 57 of file class.ilADTIntegerDefinition.php.

58 {
59 // has to be number-based
60 return ($a_adt instanceof ilADTInteger);
61 }

◆ setMax()

ilADTIntegerDefinition::setMax (   $a_value)

Definition at line 39 of file class.ilADTIntegerDefinition.php.

40 {
41 $this->max = $this->handleNumber($a_value);
42 }

References handleNumber().

+ Here is the call graph for this function:

◆ setMin()

ilADTIntegerDefinition::setMin (   $a_value)

Definition at line 29 of file class.ilADTIntegerDefinition.php.

30 {
31 $this->min = $this->handleNumber($a_value);
32 }

References handleNumber().

+ Here is the call graph for this function:

◆ setSuffix()

ilADTIntegerDefinition::setSuffix (   $a_value)

Definition at line 49 of file class.ilADTIntegerDefinition.php.

50 {
51 $this->suffix = trim($a_value);
52 }

Field Documentation

◆ $max_value

ilADTIntegerDefinition::$max_value
protected

Definition at line 6 of file class.ilADTIntegerDefinition.php.

◆ $min_value

ilADTIntegerDefinition::$min_value
protected

Definition at line 5 of file class.ilADTIntegerDefinition.php.

◆ $suffix

ilADTIntegerDefinition::$suffix
protected

Definition at line 7 of file class.ilADTIntegerDefinition.php.

Referenced by getSuffix().


The documentation for this class was generated from the following file: