ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
- Public Member Functions inherited from ilADTDefinition
 __construct ()
 Constructor.
 getType ()
 Get type (from class/instance)
 setAllowNull ($a_value)
 Toggle null allowed status.
 isNullAllowed ()
 Is null currently allowed.

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.

Detailed Description

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

Member Function Documentation

ilADTIntegerDefinition::getMax ( )

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

{
return $this->max;
}
ilADTIntegerDefinition::getMin ( )

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

{
return $this->min;
}
ilADTIntegerDefinition::getSuffix ( )

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

References $suffix.

{
return $this->suffix;
}
ilADTIntegerDefinition::handleNumber (   $a_value)

Reimplemented in ilADTFloatDefinition.

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

Referenced by setMax(), and setMin().

{
if(!is_numeric($a_value))
{
$a_value = null;
}
if($a_value !== null)
{
// round?
$a_value = (int)$a_value;
}
return $a_value;
}

+ Here is the caller graph for this function:

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 59 of file class.ilADTIntegerDefinition.php.

{
// has to be number-based
return ($a_adt instanceof ilADTInteger);
}
ilADTIntegerDefinition::setMax (   $a_value)

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

References handleNumber().

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

+ Here is the call graph for this function:

ilADTIntegerDefinition::setMin (   $a_value)

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

References handleNumber().

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

+ Here is the call graph for this function:

ilADTIntegerDefinition::setSuffix (   $a_value)

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

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

Field Documentation

ilADTIntegerDefinition::$max_value
protected

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

ilADTIntegerDefinition::$min_value
protected

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

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: