/** * Announce our state to all our listeners * */ public function announce() { Types\RestrictedSet::mapInternal('notify', array(&$this, &$this->state), $this->observers); }
/** * Remove this observer from all publishers * */ public function unlink() { Types\RestrictedSet::mapInternal('detachListener', array($this), $this->subject); }
/** * Detach conduit from everything * * NOTE: you only detach yourself from the aggregate */ public function unlink() { $listeners = $this->conduit->getValues(); Types\RestrictedSet::mapInternal('detach', array($this), $listeners); $this->publishers->detachListener($this); }