ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime Class Reference
+ Collaboration diagram for ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime:

Public Member Functions

 __construct (int $minutes)
 
 minutes ()
 

Private Attributes

readonly int $minutes
 

Detailed Description

Definition at line 25 of file PageReadingTime.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime::__construct ( int  $minutes)

Definition at line 29 of file PageReadingTime.php.

References ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\$minutes, and ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\minutes().

30  {
31  if ($minutes < 0) {
32  throw new ilException('The reading time MUST be a positive integer!');
33  }
34 
35  if ($minutes > PHP_INT_MAX) {
36  throw new ilException('The reading time MUST NOT exceed the maximum integer!');
37  }
38 
39  $this->minutes = $minutes;
40  }
+ Here is the call graph for this function:

Member Function Documentation

◆ minutes()

ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime::minutes ( )

Definition at line 42 of file PageReadingTime.php.

References ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\$minutes.

Referenced by ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\__construct().

42  : int
43  {
44  return $this->minutes;
45  }
+ Here is the caller graph for this function:

Field Documentation

◆ $minutes

readonly int ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime::$minutes
private

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