Beispiel #1
0
 /**
  * Set the User's id
  *
  * @param UserId $id
  * @return void
  */
 private function setId(UserId $id)
 {
     $this->id = $id->toString();
 }
 /**
  * Find a user by their id
  *
  * @param UserId $id
  * @return User
  */
 public function userOfId(UserId $id)
 {
     return $this->em->getRepository($this->class)->findOneBy(['id' => $id->toString()]);
 }