public function getEventHandler() { if (empty($this->events)) { throw new Phergie_Plugin_Exception('Event handler cannot be accessed before one is set', Phergie_Plugin_Exception::ERR_NO_EVENT_HANDLER); } return $this->events; }