ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ILIAS\Data\PositiveInteger Class Reference
+ Collaboration diagram for ILIAS\Data\PositiveInteger:

Public Member Functions

 __construct (int $value)
 
 getValue ()
 

Private Attributes

int $value
 

Detailed Description

Definition at line 29 of file PositiveInteger.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\PositiveInteger::__construct ( int  $value)
Exceptions
ConstraintViolationException

Definition at line 36 of file PositiveInteger.php.

37 {
38 if ($value < 0) {
39 throw new ConstraintViolationException(
40 sprintf('The value "%s" is not a positive integer', $value),
41 'exception_not_positive_integer',
42 array($value)
43 );
44 }
45
46 $this->value = $value;
47 }

References ILIAS\Data\PositiveInteger\$value.

Member Function Documentation

◆ getValue()

ILIAS\Data\PositiveInteger::getValue ( )

Definition at line 49 of file PositiveInteger.php.

49 : int
50 {
51 return $this->value;
52 }

References ILIAS\Data\PositiveInteger\$value.

Field Documentation

◆ $value

int ILIAS\Data\PositiveInteger::$value
private

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