24 if (isset(
$DIC[
'ilLoggerFactory'])) {
35 public function int(
int $min =
null,
int $max =
null) :
int
41 $max = mt_getrandmax();
45 return random_int($min, $max);
46 }
catch (Exception
$e) {
49 $logger->
error(
'No suitable random number generator found.');
52 }
catch (Throwable
$e) {
55 $logger->
error(
'max should be greater than min.');
An exception for terminatinating execution or to throw for unit testing.
Component logger with individual log levels by component id.
logStack($a_level=null, $a_message='')
log stack trace
Wrapper for generation of random numbers, strings, bytes.
int(int $min=null, int $max=null)
logIfPossible(callable $c)
__construct()
ilRandom constructor.