19 declare(strict_types=1);
36 protected int $status = self::STATUS_NO_ACTION;
48 self::CODE_MANUAL_RESET,
49 self::CODE_SUPPOSED_CRASH,
61 throw new \InvalidArgumentException(
63 'The passed status "%s" is not valid, must be of one of: %s',
70 $this->status = $a_value;
79 self::STATUS_INVALID_CONFIGURATION,
80 self::STATUS_NO_ACTION,
95 $value = trim($value);
97 throw new \InvalidArgumentException(
'The message must not exceed 400 characters');
100 $this->message = $value;
108 public function setCode(
string $a_value): void
110 if (!\in_array($a_value, self::getCoreCodes(),
true)) {
111 throw new \InvalidArgumentException(
113 'The passed code "%s" is not valid, must be of one of: %s',
115 implode(
', ', self::getCoreCodes())
120 $this->code = $a_value;
130 $this->duration = number_format($a_value, 3,
'.',
'');
setMessage(string $value)
final const int STATUS_OK
final const int STATUS_INVALID_CONFIGURATION
final const string CODE_SUPPOSED_CRASH
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static strLen(string $a_string)
final const int STATUS_NO_ACTION
final const string CODE_MANUAL_RESET
setDuration(float $a_value)
final const int STATUS_CRASHED
final const string CODE_NO_RESULT
final const int STATUS_RESET
final const int STATUS_FAIL