public function addLeader($leader)
    {
        $follower = $this->_mixer;

        if ($follower->eql($leader)) {
            return false;
        }

        if ($leader->blocking($follower)) {
            return false;
        }

        if ($follower->requested($leader)) {
            $leader->removeRequester($follower);
        }

        $edge = $this->getService('repos:actors.follow')->findOrAddNew(array(
                    'leader' => $leader,
                    'follower' => $follower,
                ));

        $edge->save();

        //add a subscriber
        if ($this->_subscribe_after_follow) {
            $leader->addSubscriber($follower);
        }

        $this->resetStats(array($leader, $follower));

        return $edge;
    }
public function addLeader($leader)
    {
        $follower = $this->_mixer;

        if ($follower->eql($leader)) {
            return false;
        }

        if ($leader->blocking($follower)) {
            return false;
        }

        if ($follower->requested($leader)) {
            $leader->removeRequester($follower);
        }

        $edge = $this->getService('repos:actors.follow')->findOrAddNew(array(
                    'leader' => $leader,
                    'follower' => $follower,
                ));

        $edge->save();

        //add a subscriber
        if ($this->_subscribe_after_follow) {
            $leader->addSubscriber($follower);
        }

        $this->resetStats(array($leader, $follower));

        return $edge;
    }
public function addLeader ( $ leader ) { $ follower = $ this -> _mixer ; if ( $ follower -> eql ( $ leader ) ) { return false ; } if ( $ leader -> blocking ( $ follower ) ) { return false ; } if ( $ follower -> requested ( $ leader ) ) { $ leader -> removeRequester ( $ follower ) ; } $ edge = $ this -> getService ( 'repos:actors.follow' ) -> findOrAddNew ( array ( 'leader' => $ leader , 'follower' => $ follower , ) ) ; $ edge -> save ( ) ; //add a subscriber if ( $ this -> _subscribe_after_follow ) { $ leader -> addSubscriber ( $ follower ) ; } $ this -> resetStats ( array ( $ leader , $ follower ) ) ; return $ edge ; }
Add a leader to the actor.

@param ComActorsDomainEntityActor $actor The actor to block
Add a leader to the actor .