ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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)
 
- 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 36 of file class.ilADTIntegerDefinition.php.

37  {
38  return $this->max;
39  }

◆ getMin()

ilADTIntegerDefinition::getMin ( )

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

27  {
28  return $this->min;
29  }

◆ getSuffix()

ilADTIntegerDefinition::getSuffix ( )

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

References $suffix.

◆ handleNumber()

ilADTIntegerDefinition::handleNumber (   $a_value)

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

Referenced by setMax(), and setMin().

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  }
+ Here is the caller graph for this function:

◆ isComparableTo()

ilADTIntegerDefinition::isComparableTo ( ilADT  $a_adt)

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

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

◆ setMax()

ilADTIntegerDefinition::setMax (   $a_value)

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

References handleNumber().

42  {
43  $this->max = $this->handleNumber($a_value);
44  }
+ Here is the call graph for this function:

◆ setMin()

ilADTIntegerDefinition::setMin (   $a_value)

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

References handleNumber().

32  {
33  $this->min = $this->handleNumber($a_value);
34  }
+ Here is the call graph for this function:

◆ setSuffix()

ilADTIntegerDefinition::setSuffix (   $a_value)

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

52  {
53  $this->suffix = trim($a_value);
54  }

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: