18declare(strict_types=1);
40 $this->
logger = $DIC->logger()->wsrv();
45 return "ECS Time and Place";
57 if (!is_object($a_json)) {
58 $this->
logger->error(__METHOD__ .
': Cannot load from JSON. No object given.');
62 $this->
logger->debug(__METHOD__ .
': ' . print_r($a_json,
true));
64 $this->room = $a_json->room ??
"";
65 $this->begin = $a_json->begin ??
"";
66 $this->end = $a_json->end ??
"";
67 $this->cycle = $a_json->cycle ??
"";
84 if (is_numeric($a_begin) && $a_begin) {
88 $this->begin = $a_begin;
111 public function setEnd(
string $a_end): void
114 if (is_numeric($a_end) && $a_end) {
143 $this->room = $a_room;
159 $this->cycle = $a_cycle;
@classDescription Date and time handling
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
Representation of ECS EContent Time Place.
setBegin($a_begin)
set begin
getUTBegin()
get begin as unix time
setRoom(string $a_room)
set room
setCycle($a_cycle)
set cycle
setEnd(string $a_end)
set end
getUTEnd()
get end as unix time
loadFromJson($a_json)
load from json
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.