Maker
extends Model
in package
Maker Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- checkAlliance() : array<string|int, mixed>
- Check if the alliance exists
- checkMoon() : mixed
- checkPlanet() : array<string|int, mixed>
- Check if the planet exists
- checkUserById() : array<string|int, mixed>
- Check if user exists by its ID
- checkUserEmail() : array<string|int, mixed>
- Check if the email exists
- checkUserName() : array<string|int, mixed>
- Check if the username exists
- createAlliance() : array<string|int, mixed>
- Create a new alliance
- createNewMoon() : void
- Create a new moon
- createNewPlanet() : void
- Create new planet with the provided details
- createNewUser() : void
- Create new user and set their new planet
- getAllActivePlanets() : array<string|int, mixed>
- Get all planets that their status is not destroyed
- getAllServerUsers() : array<string|int, mixed>
- Get all server users
- getUsersWithoutAlliance() : array<string|int, mixed>
- Get list of users without an alliance or without pending requests
- 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 —checkAlliance()
Check if the alliance exists
public
checkAlliance(string $alliance_name, string $alliance_tag) : array<string|int, mixed>
Parameters
- $alliance_name : string
- $alliance_tag : string
Return values
array<string|int, mixed> —checkMoon()
public
checkMoon(int $planet_id) : mixed
Parameters
- $planet_id : int
Return values
mixed —checkPlanet()
Check if the planet exists
public
checkPlanet(int $galaxy, int $system, int $planet) : array<string|int, mixed>
Parameters
- $galaxy : int
- $system : int
- $planet : int
Return values
array<string|int, mixed> —checkUserById()
Check if user exists by its ID
public
checkUserById(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
Return values
array<string|int, mixed> —checkUserEmail()
Check if the email exists
public
checkUserEmail(string $email) : array<string|int, mixed>
Parameters
- $email : string
Return values
array<string|int, mixed> —checkUserName()
Check if the username exists
public
checkUserName(string $username) : array<string|int, mixed>
Parameters
- $username : string
Return values
array<string|int, mixed> —createAlliance()
Create a new alliance
public
createAlliance(string $alliance_name, string $alliance_tag, int $alliance_founder, string $rank) : array<string|int, mixed>
Parameters
- $alliance_name : string
- $alliance_tag : string
- $alliance_founder : int
- $rank : string
Return values
array<string|int, mixed> —createNewMoon()
Create a new moon
public
createNewMoon(int $galaxy, int $system, int $planet, int $owner, string $moon_name, int $size, int $max_fields, int $mintemp, int $maxtemp) : void
Parameters
- $galaxy : int
- $system : int
- $planet : int
- $owner : int
- $moon_name : string
- $size : int
- $max_fields : int
- $mintemp : int
- $maxtemp : int
Return values
void —createNewPlanet()
Create new planet with the provided details
public
createNewPlanet(int $galaxy, int $system, int $planet, int $user_id, int $field_max, int $name) : void
Parameters
- $galaxy : int
- $system : int
- $planet : int
- $user_id : int
- $field_max : int
- $name : int
Return values
void —createNewUser()
Create new user and set their new planet
public
createNewUser(string $name, string $email, int $auth, string $pass, int $galaxy, int $system, int $planet) : void
Parameters
- $name : string
- $email : string
- $auth : int
- $pass : string
- $galaxy : int
- $system : int
- $planet : int
Return values
void —getAllActivePlanets()
Get all planets that their status is not destroyed
public
getAllActivePlanets() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAllServerUsers()
Get all server users
public
getAllServerUsers() : array<string|int, mixed>
Return values
array<string|int, mixed> —getUsersWithoutAlliance()
Get list of users without an alliance or without pending requests
public
getUsersWithoutAlliance() : array<string|int, mixed>
Return values
array<string|int, mixed> —setNewDb()
Creates a new Database object
private
setNewDb() : void