115 $events = array_map(
function ($eventToResolve) {
116 if (! is_callable($eventToResolve)) {
117 return $eventToResolve;
119 $newEvent =
new Event(Helper::getUniqId());
121 $eventToResolve($newEvent);
124 }, is_array($event) ? $event : [$event]);
126 $this->events = array_merge($this->events, $events);
137 if (is_null($timezone)) {
141 $timezones = array_map(
function ($eventToResolve) {
142 if (! is_callable($eventToResolve)) {
143 return $eventToResolve;
148 $eventToResolve($newTimezone);
151 }, is_array($timezone) ? $timezone : [$timezone]);
153 $this->timezones = array_merge($this->timezones, $timezones);