Constants

TABLE_STATMETADATA

TABLE_STATMETADATA

TABLE_STATISTICS

TABLE_STATISTICS

STAT_TYPE_INT

STAT_TYPE_INT

STAT_TYPE_TIME

STAT_TYPE_TIME

STAT_TYPE_FLOAT

STAT_TYPE_FLOAT

SPECIAL_STAT_KD_RATIO

SPECIAL_STAT_KD_RATIO

SPECIAL_STAT_HITS_PH

SPECIAL_STAT_HITS_PH

SPECIAL_STAT_LASER_ACC

SPECIAL_STAT_LASER_ACC

SPECIAL_STAT_NUCLEUS_ACC

SPECIAL_STAT_NUCLEUS_ACC

SPECIAL_STAT_ROCKET_ACC

SPECIAL_STAT_ROCKET_ACC

SPECIAL_STAT_ARROW_ACC

SPECIAL_STAT_ARROW_ACC

Properties

$stats

$stats : 

Type

$specialStats

$specialStats : 

Type

Methods

getUsageInformation()

getUsageInformation() 

Gets Information about the Class, and a List of the Public Method

__construct()

__construct(\ManiaControl\ManiaControl  $maniaControl) 

Construct a new statistic manager instance

Parameters

\ManiaControl\ManiaControl $maniaControl

getStatsRankingOfSpecialStat()

getStatsRankingOfSpecialStat(string  $statName = '',   $serverIndex = -1) : array

Gets The Ranking of an Special Stat

Parameters

string $statName
$serverIndex

Returns

array

getAllPlayerStats()

getAllPlayerStats(\ManiaControl\Players\Player  $player, integer  $serverIndex = -1) : array

Get all statistics of a certain player

Parameters

\ManiaControl\Players\Player $player
integer $serverIndex

Returns

array

getStatisticData()

getStatisticData(  $statName,   $playerId, integer  $serverIndex = -1) : integer

Get the value of an statistic

Parameters

$statName
$playerId
integer $serverIndex

Returns

integer

incrementStat()

incrementStat(string  $statName, \ManiaControl\Players\Player  $player, integer  $serverIndex = -1) : boolean

Increments a Statistic by one

Parameters

string $statName
\ManiaControl\Players\Player $player
integer $serverIndex

Returns

boolean

insertStat()

insertStat(string  $statName, \ManiaControl\Players\Player  $player, integer  $serverIndex = -1, mixed  $value, string  $statType = self::STAT_TYPE_INT) : boolean

Inserts a Stat into the database

Parameters

string $statName
\ManiaControl\Players\Player $player
integer $serverIndex
mixed $value

, value to Add

string $statType

Returns

boolean

defineStatMetaData()

defineStatMetaData(  $statName, string  $type = self::STAT_TYPE_INT, string  $statDescription = '') : boolean

Defines a Stat

Parameters

$statName
string $type
string $statDescription

Returns

boolean

initTables()

initTables() : boolean

Initialize necessary database tables

Returns

boolean

storeStatMetaData()

storeStatMetaData() 

Store Stats Meta Data from the Database

getStatId()

getStatId(string  $statName) : integer

Return the Stat Id

Parameters

string $statName

Returns

integer