protected function registerVote (Vote $vote, $tag = null) : Vote
    {
        // Vote identifiant
        $vote->addTags($tag);
        
        // Register
        try {
            $vote->registerLink($this);
            $this->_Votes[] = $vote;
        } catch (CondorcetException $e) {
            // Security : Check if vote object not already register
            throw new CondorcetException(6,'Vote object already registred');
        }

        return $vote;
    }
protected function registerVote (Vote $vote, $tag = null) : Vote
    {
        // Vote identifiant
        $vote->addTags($tag);
        
        // Register
        try {
            $vote->registerLink($this);
            $this->_Votes[] = $vote;
        } catch (CondorcetException $e) {
            // Security : Check if vote object not already register
            throw new CondorcetException(6,'Vote object already registred');
        }

        return $vote;
    }
protected function registerVote ( Vote $ vote , $ tag = null ) : Vote { // Vote identifiant $ vote -> addTags ( $ tag ) ; // Register try { $ vote -> registerLink ( $ this ) ; $ this -> _Votes [ ] = $ vote ; } catch ( CondorcetException $ e ) { // Security : Check if vote object not already register throw new CondorcetException ( 6 , 'Vote object already registred' ) ; } return $ vote ; }
Write a new vote
Write a new vote