Rankings
in package
Table of Contents
Methods
- allianceStats() : array<int, DatabaseRecord>
- Get stats from the alliance table sorted by $stat (high to low).
- allianceStatsFromHOF() : array<int, DatabaseRecord>
- Gets alliance stats from the hof table sorted by $category (high to low).
- calculateMinMaxRanks() : array{: int, : int}
- collectAllianceRankings() : array<int, Alliance, Class: string, Value: int}>
- collectRaceRankings() : array<int, array{style: string, race_id: int, amount: int, amount_avg: int, num_players: int}>
- collectRankings() : array<int, AbstractPlayer, Class: string, Value: int}>
- collectSectorRankings() : array<int, array{Class: string, SectorID: int, Value: int}>
- ourRank() : int
- Given a $rankedStats array returned by one of the stats functions, find the rank associated with a specific ID.
- playerStats() : array<int, DatabaseRecord>
- Get stats from the player table sorted by $stat (high to low).
- playerStatsFromHOF() : array<int, DatabaseRecord>
- Gets player stats from the hof table sorted by $category (high to low).
- raceStats() : array<int, DatabaseRecord>
- Get stats from the player table grouped by race and sorted by $stat (high to low).
- filterRanks() : array<int, DatabaseRecord>
Methods
allianceStats()
Get stats from the alliance table sorted by $stat (high to low).
public
static allianceStats(string $stat, int $gameID[, int|null $limit = null ]) : array<int, DatabaseRecord>
Parameters
- $stat : string
- $gameID : int
- $limit : int|null = null
Return values
array<int, DatabaseRecord>allianceStatsFromHOF()
Gets alliance stats from the hof table sorted by $category (high to low).
public
static allianceStatsFromHOF(array<string|int, string> $category, int $gameID) : array<int, DatabaseRecord>
Parameters
- $category : array<string|int, string>
- $gameID : int
Return values
array<int, DatabaseRecord>calculateMinMaxRanks()
public
static calculateMinMaxRanks(int $ourRank, int $totalRanks) : array{: int, : int}
Parameters
- $ourRank : int
- $totalRanks : int
Return values
array{: int, : int}collectAllianceRankings()
public
static collectAllianceRankings(array<int, DatabaseRecord> $rankedStats, AbstractPlayer|null $player[, int $minRank = 1 ][, int $maxRank = 10 ]) : array<int, Alliance, Class: string, Value: int}>
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $player : AbstractPlayer|null
- $minRank : int = 1
- $maxRank : int = 10
Return values
array<int, Alliance, Class: string, Value: int}>collectRaceRankings()
public
static collectRaceRankings(array<int, DatabaseRecord> $rankedStats, AbstractPlayer $player) : array<int, array{style: string, race_id: int, amount: int, amount_avg: int, num_players: int}>
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $player : AbstractPlayer
Return values
array<int, array{style: string, race_id: int, amount: int, amount_avg: int, num_players: int}>collectRankings()
public
static collectRankings(array<int, DatabaseRecord> $rankedStats, AbstractPlayer|null $player[, int $minRank = 1 ][, int $maxRank = 10 ]) : array<int, AbstractPlayer, Class: string, Value: int}>
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $player : AbstractPlayer|null
- $minRank : int = 1
- $maxRank : int = 10
Return values
array<int, AbstractPlayer, Class: string, Value: int}>collectSectorRankings()
public
static collectSectorRankings(array<int, DatabaseRecord> $rankedStats, AbstractPlayer $player[, int $minRank = 1 ][, int $maxRank = 10 ]) : array<int, array{Class: string, SectorID: int, Value: int}>
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $player : AbstractPlayer
- $minRank : int = 1
- $maxRank : int = 10
Return values
array<int, array{Class: string, SectorID: int, Value: int}>ourRank()
Given a $rankedStats array returned by one of the stats functions, find the rank associated with a specific ID.
public
static ourRank(array<int, DatabaseRecord> $rankedStats, int $ourID) : int
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $ourID : int
Return values
intplayerStats()
Get stats from the player table sorted by $stat (high to low).
public
static playerStats("experience"|"kills"|"deaths"|"assists" $stat, int $gameID[, int|null $limit = null ]) : array<int, DatabaseRecord>
Parameters
- $stat : "experience"|"kills"|"deaths"|"assists"
- $gameID : int
- $limit : int|null = null
Return values
array<int, DatabaseRecord>playerStatsFromHOF()
Gets player stats from the hof table sorted by $category (high to low).
public
static playerStatsFromHOF(array<string|int, string> $category, int $gameID) : array<int, DatabaseRecord>
Parameters
- $category : array<string|int, string>
- $gameID : int
Return values
array<int, DatabaseRecord>raceStats()
Get stats from the player table grouped by race and sorted by $stat (high to low).
public
static raceStats("experience"|"kills"|"deaths" $stat, int $gameID) : array<int, DatabaseRecord>
Parameters
- $stat : "experience"|"kills"|"deaths"
- $gameID : int
Return values
array<int, DatabaseRecord>filterRanks()
private
static filterRanks(array<int, DatabaseRecord> $rankedStats, int $minRank, int $maxRank) : array<int, DatabaseRecord>
Parameters
- $rankedStats : array<int, DatabaseRecord>
- $minRank : int
- $maxRank : int