ILIAS  release_8 Revision v8.24
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 27 of file RangeDimension.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 31 of file RangeDimension.php.

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

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 37 of file RangeDimension.php.

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

Field Documentation

◆ $cardinal_dimension

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

Definition at line 29 of file RangeDimension.php.

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


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