Research
extends Model
in package
Research Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- getAllLabsLevel() : int
- Get the total amount of laboratory levels
- getPlanetResearching() : array<string|int, mixed>
- Get planet that's currently researching
- startNewResearch() : void
- Start a new research
- setNewDb() : void
- Creates a new Database object
Properties
$db
Contains the Database instance
protected
Database
$db
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__destruct()
Destructor
public
__destruct() : mixed
Return values
mixed —getAllLabsLevel()
Get the total amount of laboratory levels
public
getAllLabsLevel(int $user_id, int $labs_limit) : int
Parameters
- $user_id : int
- $labs_limit : int
Return values
int —getPlanetResearching()
Get planet that's currently researching
public
getPlanetResearching(int $current_research) : array<string|int, mixed>
Parameters
- $current_research : int
Return values
array<string|int, mixed> —startNewResearch()
Start a new research
public
startNewResearch(array<string|int, mixed> $working_planet, array<string|int, mixed> $current_user) : void
Parameters
- $working_planet : array<string|int, mixed>
- $current_user : array<string|int, mixed>
Return values
void —setNewDb()
Creates a new Database object
private
setNewDb() : void