ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Data\Dimension\RangeDimension Class Reference
+ Inheritance diagram for ILIAS\Data\Dimension\RangeDimension:
+ Collaboration diagram for ILIAS\Data\Dimension\RangeDimension:

Public Member Functions

 __construct (CardinalDimension $cardinal_dimension)
 
 checkValue ($value)
 
- Public Member Functions inherited from ILIAS\Data\Dimension\Dimension
 getLabels ()
 
 checkValue ($value)
 

Protected Attributes

CardinalDimension $cardinal_dimension
 
- Protected Attributes inherited from ILIAS\Data\Dimension\Dimension
array $value_labels = []
 

Detailed Description

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 26 of file RangeDimension.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\Dimension\RangeDimension::__construct ( CardinalDimension  $cardinal_dimension)

Definition at line 30 of file RangeDimension.php.

31 {
32 $this->cardinal_dimension = $cardinal_dimension;
33 $this->value_labels = $this->cardinal_dimension->getLabels();
34 }

References ILIAS\Data\Dimension\RangeDimension\$cardinal_dimension, and ILIAS\Data\Dimension\Dimension\getLabels().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkValue()

ILIAS\Data\Dimension\RangeDimension::checkValue (   $value)

Reimplemented from ILIAS\Data\Dimension\Dimension.

Definition at line 36 of file RangeDimension.php.

36 : void
37 {
38 if (is_null($value)) {
39 return;
40 }
41 if (!is_array($value)) {
42 throw new \InvalidArgumentException(
43 "Expected parameter to be null or an array with exactly two numeric parameters.
44 '$value' is given."
45 );
46 } elseif (count($value) !== 2) {
47 throw new \InvalidArgumentException(
48 "Expected parameter to be an array with exactly two numeric parameters."
49 );
50 } else {
51 foreach ($value as $number) {
52 $this->cardinal_dimension->checkValue($number);
53 }
54 }
55 }

Field Documentation

◆ $cardinal_dimension

CardinalDimension ILIAS\Data\Dimension\RangeDimension::$cardinal_dimension
protected

Definition at line 28 of file RangeDimension.php.

Referenced by ILIAS\Data\Dimension\RangeDimension\__construct().


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