public function getData($firstDay, $lastDay, $UserID = null, $skip = array()) { if ($UserID === null) { $UserID = Session::currentUser()->getID(); } Registry::reset("Kalender"); $K = new Kalender(); $K->timeRange($firstDay, $lastDay); while ($return = Registry::callNext("Kalender", "events", array($firstDay, $lastDay, $UserID), $skip)) { $K->merge($return); } Registry::reset("Kalender"); while ($return = Registry::callNext("Kalender", "holidays", array($firstDay, $lastDay, $UserID), $skip)) { $K->merge($return); } $K->exceptions(); return $K; }