Galaxy
extends Model
in package
Galaxy Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- countAmountFleetsByUserId() : array<string|int, mixed>
- Get amount of fleets that the user has
- getGalaxyDataByGalaxyAndSystem() : array<string|int, mixed>
- Get galaxy data by galaxy and system
- getPlanetDebrisByCoords() : array<string|int, mixed>|null
- Get planet debris by coordinates
- getTargetUserDataByCoords() : array<string|int, mixed>|null
- Get target user data by coords
- 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 —countAmountFleetsByUserId()
Get amount of fleets that the user has
public
countAmountFleetsByUserId(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
Return values
array<string|int, mixed> —getGalaxyDataByGalaxyAndSystem()
Get galaxy data by galaxy and system
public
getGalaxyDataByGalaxyAndSystem(int $galaxy, int $system, int $user_id) : array<string|int, mixed>
Parameters
- $galaxy : int
- $system : int
- $user_id : int
Return values
array<string|int, mixed> —getPlanetDebrisByCoords()
Get planet debris by coordinates
public
getPlanetDebrisByCoords(int $galaxy, int $system, int $planet) : array<string|int, mixed>|null
Parameters
- $galaxy : int
- $system : int
- $planet : int
Return values
array<string|int, mixed>|null —getTargetUserDataByCoords()
Get target user data by coords
public
getTargetUserDataByCoords(int $galaxy, int $system, int $planet[, int $planet_type = 1 ]) : array<string|int, mixed>|null
Parameters
- $galaxy : int
- $system : int
- $planet : int
- $planet_type : int = 1
Return values
array<string|int, mixed>|null —setNewDb()
Creates a new Database object
private
setNewDb() : void