コード例 #1
0
 /**
  * Creates a User object based on a DB row.
  *
  * @param array $row The DB row containing User data.
  * @return \VeryGoodTrip\Domain\User
  */
 protected function buildDomainObject($row)
 {
     $user = new User();
     $user->setId($row['user_id']);
     $user->setEmail($row['user_email']);
     $user->setLastname($row['user_lastname']);
     $user->setFirstname($row['user_firstname']);
     $user->setPassword($row['user_password']);
     $user->setSalt($row['user_salt']);
     $user->setAddress($row['user_address']);
     $user->setTown($row['user_town']);
     $user->setZipcode($row['user_zipcode']);
     $user->setRole($row['user_role']);
     return $user;
 }