public function createRating($id = null)
    {
        $class = $this->getClass();
        $rating = new $class;

        if (null !== $id) {
            $rating->setId($id);
        }

        $this->dispatcher->dispatch(DCSRatingEvents::RATING_CREATE, new Event\RatingEvent($rating));

        return $rating;
    }
public function createRating($id = null)
    {
        $class = $this->getClass();
        $rating = new $class;

        if (null !== $id) {
            $rating->setId($id);
        }

        $this->dispatcher->dispatch(DCSRatingEvents::RATING_CREATE, new Event\RatingEvent($rating));

        return $rating;
    }
public function createRating ( $ id = null ) { $ class = $ this -> getClass ( ) ; $ rating = new $ class ; if ( null !== $ id ) { $ rating -> setId ( $ id ) ; } $ this -> dispatcher -> dispatch ( DCSRatingEvents :: RATING_CREATE , new Event \ RatingEvent ( $ rating ) ) ; return $ rating ; }
Creates an empty rating instance

@param string $id
@return \DCS\RatingBundle\Model\RatingInterface
Creates an empty rating instance