GamePointUtil Class Reference

Static Public Member Functions

static addPointsByPointData (User $user, $pointTypeAndValueData)
static getUserLeaderboardData ($type, $startingRank=1, $offset=null, $count=null)
static getUserLeaderboardCount ($type)
static getUserRankingData (User $user)

Data Fields

const LEADERBOARD_TYPE_WEEKLY = 'Weekly Leaderboard'
const LEADERBOARD_TYPE_MONTHLY = 'Monthly Leaderboard'
const LEADERBOARD_TYPE_OVERALL = 'Overall Leaderboard'

Static Protected Member Functions

static makeUserLeaderboardSqlQuery ($type, $offset=null, $count=null)
static makeUserLeaderboardCountSqlQuery ($type)
static resolveLeaderboardWhereClausesByType ($type, &$where)

Detailed Description

Helper class for working with game points.

Definition at line 40 of file GamePointUtil.php.


Member Function Documentation

static addPointsByPointData ( User user,
pointTypeAndValueData 
) [static]

Given an array of point values indexed by point types, add points for the specified user. This will call a method to add points in a deferred way. This means that at the end of the request all deferred points will be added at once. This is done to improve performance.

Parameters:
User $user
array $pointTypeAndValueData

Definition at line 55 of file GamePointUtil.php.

static getUserLeaderboardData ( type,
startingRank = 1,
offset = null,
count = null 
) [static]
Parameters:
string $type
int $startingRank
null|int $offset
null|int $count
Returns:
array

Definition at line 72 of file GamePointUtil.php.

static makeUserLeaderboardSqlQuery ( type,
offset = null,
count = null 
) [static, protected]
Parameters:
string $type
null|int $offset
null|int $count
Returns:
string

Definition at line 110 of file GamePointUtil.php.

static makeUserLeaderboardCountSqlQuery ( type  )  [static, protected]
Parameters:
string $type
Returns:
string

Definition at line 137 of file GamePointUtil.php.

static getUserRankingData ( User user  )  [static]
Parameters:
User $user
Returns:
array

Definition at line 200 of file GamePointUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Mar 27 07:10:25 2017