Beispiel #1
0
 /**
  *
  * @return <CompleteProfileWrapper>
  */
 public function getProfile()
 {
     $user = $_SESSION['loggedin_user'];
     $completeProfileWrapper = new CompleteProfileWrapper();
     $userProfileDAO = new UserProfileDAO();
     $userProfile = $userProfileDAO->getUserProfile($user);
     $completeProfileWrapper->setUserProfile($userProfile);
     $_SESSION['user_profile'] = $userProfile;
     $friendUtil = new FriendsUtil();
     $friends = $friendUtil->getFriends($user);
     $completeProfileWrapper->friendsArray = $friends;
     $gameUtil = new GameUtil();
     $gameProfile = $gameUtil->getGameProfile($user);
     $completeProfileWrapper->setGameProfile($gameProfile);
     $_SESSION['game_profile'] = $gameProfile;
     $currentSearchPartyUtil = new CurrentSearchPartyUtil();
     $currentSearchParties = $currentSearchPartyUtil->getCurrentSearchParty($user);
     $completeProfileWrapper->currentSearchPartiesArray = $currentSearchParties;
     $friendSearchParties = $currentSearchPartyUtil->getFriendSearchParty($user);
     $completeProfileWrapper->friendSearchPartiesArray = $friendSearchParties;
     $inventoryUtil = new InventoryUtil();
     $myInventory = $inventoryUtil->getInventory($user);
     $completeProfileWrapper->myArtifacts = $myInventory;
     return $completeProfileWrapper;
 }