예제 #1
0
 /**
  * @param UserEmail $email
  *
  * @return User|null
  */
 public function findByEmail(UserEmail $email)
 {
     if ($userEntity = $this->userRepository->findOneByEmail($email->toString())) {
         return $this->transformPDOEntityToUser($userEntity);
     }
     return false;
 }
예제 #2
0
 /**
  * @test
  */
 public function validEmailIsProperlySetAndRetrieved()
 {
     $emailString = '*****@*****.**';
     $email = new UserEmail($emailString);
     $this->assertEquals($emailString, $email->toString());
 }
예제 #3
0
 /**
  * @param UserUuid $userUuid
  * @param UserName $userName
  * @param UserEmail $email
  */
 public function __construct(UserUuid $userUuid, UserName $userName, UserEmail $email)
 {
     $this->userUuid = $userUuid->toString();
     $this->userName = $userName->toString();
     $this->userEmail = $email->toString();
 }