public function addRating(User $user, $clientIp, $rating)
 {
     $date = new \DateTime();
     $ratin = new Ratin();
     $ratin->setDate($date);
     $ratin->setIpAdress($clientIp);
     $ratin->setRating($rating);
     $ratin->setUserId($user);
     $this->getEntityManager()->persist($ratin);
     $this->getEntityManager()->flush();
     return true;
 }
 /**
  * {@inheritDoc}
  */
 public function setUserId(\WorkerBundle\Entity\User $user)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUserId', [$user]);
     return parent::setUserId($user);
 }