Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

GamePointUtil Class Reference

Static Public Member Functions

static addPointsByPointData (User $user, $pointTypeAndValueData)
static getUserLeaderboardData ($type, $startingRank=1, $offset=null, $count=null, User $user=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,
User user = 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 113 of file GamePointUtil.php.

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

Definition at line 140 of file GamePointUtil.php.

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

Definition at line 203 of file GamePointUtil.php.


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

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8