ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilADTMultiEnumDefinition Class Reference
+ Inheritance diagram for ilADTMultiEnumDefinition:
+ Collaboration diagram for ilADTMultiEnumDefinition:

Public Member Functions

 reset ()
 Init property defaults.
 getOptions ()
 setOptions (array $a_values)
 isNumeric ()
 setNumeric ($a_value)
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self.
 getADTInstance ()
- 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

 $options
 $numeric
- Protected Attributes inherited from ilADTDefinition
 $allow_null

Detailed Description

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

Member Function Documentation

ilADTMultiEnumDefinition::getADTInstance ( )

Definition at line 65 of file class.ilADTMultiEnumDefinition.php.

References isNumeric().

{
if($this->isNumeric())
{
$class = "ilADTMultiEnumNumeric";
}
else
{
$class = "ilADTMultiEnumText";
}
include_once "Services/ADT/classes/Types/MultiEnum/class.ilADTMultiEnum.php";
include_once "Services/ADT/classes/Types/MultiEnum/class.".$class.".php";
return new $class($this);
}

+ Here is the call graph for this function:

ilADTMultiEnumDefinition::getOptions ( )

Definition at line 22 of file class.ilADTMultiEnumDefinition.php.

References $options.

{
}
ilADTMultiEnumDefinition::isComparableTo ( ilADT  $a_adt)

Check if given ADT is comparable to self.

Parameters
ilADT$a_adt
Returns
bool

Reimplemented from ilADTDefinition.

Definition at line 56 of file class.ilADTMultiEnumDefinition.php.

{
// has to be text-based
return ($a_adt instanceof ilADTMultiEnum);
}
ilADTMultiEnumDefinition::isNumeric ( )

Definition at line 43 of file class.ilADTMultiEnumDefinition.php.

References $numeric.

Referenced by getADTInstance(), and setOptions().

{
}

+ Here is the caller graph for this function:

ilADTMultiEnumDefinition::reset ( )

Init property defaults.

Reimplemented from ilADTDefinition.

Definition at line 11 of file class.ilADTMultiEnumDefinition.php.

References setNumeric().

{
$this->options = array();
$this->setNumeric(true);
}

+ Here is the call graph for this function:

ilADTMultiEnumDefinition::setNumeric (   $a_value)

Definition at line 48 of file class.ilADTMultiEnumDefinition.php.

Referenced by reset().

{
$this->numeric = $a_value;
}

+ Here is the caller graph for this function:

ilADTMultiEnumDefinition::setOptions ( array  $a_values)

Definition at line 27 of file class.ilADTMultiEnumDefinition.php.

References isNumeric().

{
if($this->isNumeric())
{
foreach(array_keys($a_values) as $key)
{
if(!is_numeric($key))
{
throw new Exception("ilADTMultiEnum was expecting numeric option keys");
}
}
}
$this->options = $a_values;
}

+ Here is the call graph for this function:

Field Documentation

ilADTMultiEnumDefinition::$numeric
protected

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

Referenced by isNumeric().

ilADTMultiEnumDefinition::$options
protected

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

Referenced by getOptions().


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