public function removeSubscribers($subscribers)
    {
        $subscribers = AnConfig::unbox($subscribers);

        if (is($subscribers, 'AnDomainEntityAbstract')) {
            $subscribers = array($subscribers);
        } else {
            $subscribers = (array) $subscribers;
        }

        $ids = $this->subscriberIds->toArray();

        foreach ($subscribers as $subscriber) {
            $id = is($subscriber, 'AnDomainEntityAbstract') ? $subscriber->id : $subscriber;
            unset($ids[$id]);
        }

        $this->set('subscriberIds', AnDomainAttribute::getInstance('set')->setData($ids));

        //if there are no more subscriber then delete the notification
        if (empty($ids)) {
            $this->delete();
        }

        return $this;
    }
public function removeSubscribers($subscribers)
    {
        $subscribers = AnConfig::unbox($subscribers);

        if (is($subscribers, 'AnDomainEntityAbstract')) {
            $subscribers = array($subscribers);
        } else {
            $subscribers = (array) $subscribers;
        }

        $ids = $this->subscriberIds->toArray();

        foreach ($subscribers as $subscriber) {
            $id = is($subscriber, 'AnDomainEntityAbstract') ? $subscriber->id : $subscriber;
            unset($ids[$id]);
        }

        $this->set('subscriberIds', AnDomainAttribute::getInstance('set')->setData($ids));

        //if there are no more subscriber then delete the notification
        if (empty($ids)) {
            $this->delete();
        }

        return $this;
    }
public function removeSubscribers ( $ subscribers ) { $ subscribers = AnConfig :: unbox ( $ subscribers ) ; if ( is ( $ subscribers , 'AnDomainEntityAbstract' ) ) { $ subscribers = array ( $ subscribers ) ; } else { $ subscribers = ( array ) $ subscribers ; } $ ids = $ this -> subscriberIds -> toArray ( ) ; foreach ( $ subscribers as $ subscriber ) { $ id = is ( $ subscriber , 'AnDomainEntityAbstract' ) ? $ subscriber -> id : $ subscriber ; unset ( $ ids [ $ id ] ) ; } $ this -> set ( 'subscriberIds' , AnDomainAttribute :: getInstance ( 'set' ) -> setData ( $ ids ) ) ; //if there are no more subscriber then delete the notification if ( empty ( $ ids ) ) { $ this -> delete ( ) ; } return $ this ; }
Removes an array of people or ids from the list of subscribers.

@param ComActorsDomainEntityActor|array $subscribers An array of people or ids
Removes an array of people or ids from the list of subscribers .