Trader
extends Model
in package
Trader Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- refillStorage() : void
- Refill planet storage and discount the needed dark matter
- 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 —refillStorage()
Refill planet storage and discount the needed dark matter
public
refillStorage(int $dark_matter, string $resource, float $amount, int $user_id, int $planet_id) : void
Parameters
- $dark_matter : int
- $resource : string
- $amount : float
- $user_id : int
- $planet_id : int
Return values
void —setNewDb()
Creates a new Database object
private
setNewDb() : void