24 if (isset($DIC[
'ilLoggerFactory'])) {
25 $c($DIC->logger()->rnd());
35 public function int(
int $min = null,
int $max = null) :
int 41 $max = mt_getrandmax();
45 return random_int($min, $max);
49 $logger->
error(
'No suitable random number generator found.');
55 $logger->
error(
'max should be greater than min.');
__construct()
ilRandom constructor.
logStack($a_level=null, $a_message='')
log stack trace
int(int $min=null, int $max=null)
logIfPossible(callable $c)
Wrapper for generation of random numbers, strings, bytes.
Component logger with individual log levels by component id.