id() public method

public id ( ) : string
return string
 /**
  * {@inheritdoc}
  */
 public function ofId(UserId $userId)
 {
     if (!isset($this->users[$userId->id()])) {
         return;
     }
     return $this->users[$userId->id()];
 }
示例#2
0
 /**
  * @param UserId $userId
  *
  * @return bool
  */
 public function equals(UserId $userId)
 {
     return $this->id() === $userId->id();
 }
 /**
  * @param UserId $userId
  * @return User
  */
 public function userOfId(UserId $userId)
 {
     return $this->find($userId->id());
 }
 /**
  * @param UserId $userId
  *
  * @return mixed
  */
 public function badgesFrom(UserId $userId)
 {
     return $this->userAdapter->toBadges($userId->id());
 }
 /**
  * @param UserId $userId
  * @return Wish[]
  */
 public function wishesOfUserId(UserId $userId)
 {
     return $this->findBy(['surrogateUserId' => $userId->id()]);
 }