public function firstEvent() { if ($this->eventCount < 1) { throw new UndefinedEventException(0); } return $this->events[0]; }