Infos
extends Model
in package
Infos Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- doJump() : void
- Do jump - Move ships from one planet to another
- getListOfMoons() : array<string|int, mixed>
- Get a list of moons
- getTargetGate() : array<string|int, mixed>
- Get the target planet to jump
- 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 —doJump()
Do jump - Move ships from one planet to another
public
doJump(string $sub_query_origin, string $sub_query_destiny, int $jump_time, int $current_planet_id, int $target_planet_id, int $user_id) : void
Parameters
- $sub_query_origin : string
- $sub_query_destiny : string
- $jump_time : int
- $current_planet_id : int
- $target_planet_id : int
- $user_id : int
Return values
void —getListOfMoons()
Get a list of moons
public
getListOfMoons(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
Return values
array<string|int, mixed> —getTargetGate()
Get the target planet to jump
public
getTargetGate(int $target_planet_id) : array<string|int, mixed>
Parameters
- $target_planet_id : int
Return values
array<string|int, mixed> —setNewDb()
Creates a new Database object
private
setNewDb() : void