ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
PageReadingTime.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ContentPage\PageMetrics\ValueObject
;
22
23
use
ilException
;
24
30
class
PageReadingTime
31
{
32
private
int
$minutes
;
33
39
public
function
__construct
(
int
$minutes
)
40
{
41
if
(
$minutes
< 0) {
42
throw
new
ilException
(
'The reading time MUST be a positive integer!'
);
43
}
44
45
if
(
$minutes
> PHP_INT_MAX) {
46
throw
new
ilException
(
'The reading time MUST NOT exceed the maximum integer!'
);
47
}
48
49
$this->
minutes
=
$minutes
;
50
}
51
52
public
function
minutes
():
int
53
{
54
return
$this->minutes
;
55
}
56
}
ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime
Definition:
PageReadingTime.php:31
ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\$minutes
int $minutes
Definition:
PageReadingTime.php:32
ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\minutes
minutes()
Definition:
PageReadingTime.php:52
ILIAS\ContentPage\PageMetrics\ValueObject\PageReadingTime\__construct
__construct(int $minutes)
PageReadingTime constructor.
Definition:
PageReadingTime.php:39
ilException
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilException.php:26
ILIAS\ContentPage\PageMetrics\ValueObject
Definition:
PageReadingTime.php:21
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Modules
ContentPage
classes
PageMetrics
ValueObject
PageReadingTime.php
Generated on Sun Nov 2 2025 22:01:07 for ILIAS by
1.9.4 (using
Doxyfile
)