ILIAS  release_8 Revision v8.24
PageReadingTime.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilException;
24
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}
__construct(int $minutes)
PageReadingTime constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...