PHPDaemon\PubSub\PubSubEvent::unsub PHP Method

unsub() public method

Unsubscripe
public unsub ( object $obj ) : this
$obj object Subscriber object
return this
    public function unsub($obj)
    {
        $this->detach($obj);
        if ($this->count() === 0) {
            if (($func = $this->deactCb) !== null) {
                $func($this);
            }
        }
        return $this;
    }