public function setEventManager(EventManagerInterface $events) { $this->events = $events; $events->attach('dispatch', array($this, 'checkOptions'), 10); }