public function createVote(RatingInterface $rating, UserInterface $voter)
    {
        $class = $this->getClass();
        $vote = new $class;
        $vote->setRating($rating);
        $vote->setVoter($voter);

        $this->dispatcher->dispatch(DCSRatingEvents::VOTE_CREATE, new Event\VoteEvent($vote));

        return $vote;
    }
public function createVote(RatingInterface $rating, UserInterface $voter)
    {
        $class = $this->getClass();
        $vote = new $class;
        $vote->setRating($rating);
        $vote->setVoter($voter);

        $this->dispatcher->dispatch(DCSRatingEvents::VOTE_CREATE, new Event\VoteEvent($vote));

        return $vote;
    }
public function createVote ( RatingInterface $ rating , UserInterface $ voter ) { $ class = $ this -> getClass ( ) ; $ vote = new $ class ; $ vote -> setRating ( $ rating ) ; $ vote -> setVoter ( $ voter ) ; $ this -> dispatcher -> dispatch ( DCSRatingEvents :: VOTE_CREATE , new Event \ VoteEvent ( $ vote ) ) ; return $ vote ; }
Creates an empty vote instance

@param RatingInterface $rating
@param UserInterface $voter
@return \DCS\RatingBundle\Model\VoteInterface
Creates an empty vote instance