StatisticsLibrary
extends XGPCore
in package
StatisticsLibrary Class
Table of Contents
- $lang : mixed
- $objects : mixed
- $statisticsLibraryModel : Statistics_library
- Contains the model
- $time : mixed
- __construct() : void
- Constructor
- calculatePoints() : int
- calculatePoints
- makeStats() : array<string|int, mixed>
- makeStats
- rebuildPoints() : bool
- Rebuild the user points for the current planet and specific structure type.
- loadLang() : void
- Load a language file using CI Library
- makeAllyRank() : void
- makeAllyRank
- makeUserRank() : void
- makeUserRank
- setObjectsClass() : void
- setObjectsClass
Properties
$lang
protected
static mixed
$lang
$objects
protected
static mixed
$objects
$statisticsLibraryModel
Contains the model
private
Statistics_library
$statisticsLibraryModel
$time
private
mixed
$time
Methods
__construct()
Constructor
public
__construct() : void
Return values
void —calculatePoints()
calculatePoints
public
static calculatePoints(string $element, int $level[, string $type = '' ]) : int
Parameters
- $element : string
-
Element
- $level : int
-
Level
- $type : string = ''
-
Type
Return values
int —makeStats()
makeStats
public
makeStats() : array<string|int, mixed>
Return values
array<string|int, mixed> —rebuildPoints()
Rebuild the user points for the current planet and specific structure type.
public
rebuildPoints(int $user_id, int $planet_id, string $what) : bool
Parameters
- $user_id : int
-
The user ID
- $planet_id : int
-
The planet ID
- $what : string
-
The structure type (buildings|defenses|research|ships)
Return values
bool —loadLang()
Load a language file using CI Library
protected
loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
- $language_file : string|array<string|int, mixed>
Return values
void —makeAllyRank()
makeAllyRank
private
makeAllyRank() : void
Return values
void —makeUserRank()
makeUserRank
private
makeUserRank() : void
Return values
void —setObjectsClass()
setObjectsClass
private
setObjectsClass() : void