src/Node/Node.php
public function addSubscriber(SubscriberInterface $subscriber): NodeInterface
    {
        $this->_subscribers[$subscriber->getId()] = $subscriber;

        return $this;
    }
public function addSubscriber(SubscriberInterface $subscriber): NodeInterface
    {
        $this->_subscribers[$subscriber->getId()] = $subscriber;

        return $this;
    }
public function addSubscriber ( SubscriberInterface $ subscriber ) : NodeInterface { $ this -> _subscribers [ $ subscriber -> getId ( ) ] = $ subscriber ; return $ this ; }
Adds a subscriber.

@param SubscriberInterface $subscriber - Subscriber.

@return NodeInterface
Adds a subscriber .