public function cancel() { if (isset($this->emitter)) { $this->emitter->removeListener($this->getEvent(), $this->getHandler()); } }