ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 28 of file PositiveInteger.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 35 of file PositiveInteger.php.

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

References ILIAS\Data\PositiveInteger\$value.

Member Function Documentation

◆ getValue()

ILIAS\Data\PositiveInteger::getValue ( )

Definition at line 48 of file PositiveInteger.php.

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

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: