ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 30 of file PageReadingTime.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 34 of file PageReadingTime.php.

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

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

Member Function Documentation

◆ minutes()

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

Definition at line 47 of file PageReadingTime.php.

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

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

47  : int
48  {
49  return $this->minutes;
50  }
+ 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: