Example #1
0
function bindUserEntity($userEntity)
{
    if ($userEntity != null) {
        $userDto = new UserDto();
        $userDto->setUserId($userEntity->getUserId());
        $userDto->setEmail($userEntity->getEmail());
        $userDto->setPassword($userEntity->getPassword());
        $userDto->setName($userEntity->getName());
        $userDto->setSurname($userEntity->getSurname());
        $userDto->setPhone($userEntity->getPhone());
        $userDto->setGender($userEntity->getGender());
        $userDto->setAge($userEntity->getAge());
        $userDto->setUserAllowPush($userEntity->getUserAllowPush());
        return $userDto;
    } else {
        return null;
    }
}