/** * Set the User's id * * @param UserId $id * @return void */ private function setId(UserId $id) { $this->id = $id->toString(); }
/** * Set UserId * @param UserId $userId */ private function setUserId(UserId $userId) { $this->userId = $userId->toString(); }
/** * Find a user by their id * * @param UserId $id * @return User */ public function userOfId(UserId $id) { return $this->find($id->toString()); }