src/Kunstmaan/VotingBundle/Services/RepositoryResolver.php
public function getRepositoryForEvent($event)
    {
        $repository = null;

        if ($event instanceof DownVoteEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\UpDown\DownVote');
        }

        if ($event instanceof UpVoteEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\UpDown\UpVote');
        }

        if ($event instanceof LinkedInShareEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\LinkedIn\LinkedInShare');
        }

        if ($event instanceof FacebookLikeEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\Facebook\FacebookLike');
        }

        if ($event instanceof FacebookSendEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\Facebook\FacebookSend');
        }

        return $repository;
    }
public function getRepositoryForEvent($event)
    {
        $repository = null;

        if ($event instanceof DownVoteEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\UpDown\DownVote');
        }

        if ($event instanceof UpVoteEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\UpDown\UpVote');
        }

        if ($event instanceof LinkedInShareEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\LinkedIn\LinkedInShare');
        }

        if ($event instanceof FacebookLikeEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\Facebook\FacebookLike');
        }

        if ($event instanceof FacebookSendEvent) {
            $repository = $this->getRepository('Kunstmaan\VotingBundle\Entity\Facebook\FacebookSend');
        }

        return $repository;
    }
public function getRepositoryForEvent ( $ event ) { $ repository = null ; if ( $ event instanceof DownVoteEvent ) { $ repository = $ this -> getRepository ( 'Kunstmaan\VotingBundle\Entity\UpDown\DownVote' ) ; } if ( $ event instanceof UpVoteEvent ) { $ repository = $ this -> getRepository ( 'Kunstmaan\VotingBundle\Entity\UpDown\UpVote' ) ; } if ( $ event instanceof LinkedInShareEvent ) { $ repository = $ this -> getRepository ( 'Kunstmaan\VotingBundle\Entity\LinkedIn\LinkedInShare' ) ; } if ( $ event instanceof FacebookLikeEvent ) { $ repository = $ this -> getRepository ( 'Kunstmaan\VotingBundle\Entity\Facebook\FacebookLike' ) ; } if ( $ event instanceof FacebookSendEvent ) { $ repository = $ this -> getRepository ( 'Kunstmaan\VotingBundle\Entity\Facebook\FacebookSend' ) ; } return $ repository ; }
Return repository for event

@param Event $event event

@return Repository
Return repository for event