/** * Add multiple events * * @param array|ArrayAccess $events * @param array $customAttributes * @return $this */ public function addEvents($events, array $customAttributes = []) { foreach ($events as $event) { $this->eventCollection->push($event, $customAttributes); } return $this; }
/** * Add multiple events * * @param array|ArrayAccess $events * @param array $customAttributes * @return $this */ public function addEvents($events, array $customAttributes = []) { if (!empty($customAttributes)) { foreach ($events as $event) { $this->eventCollection->push($event, $customAttributes); } } else { $this->eventCollection->merge($events); } return $this; }