XG Proyect

Preferences extends Model
in package

Preferences Class

Table of Contents

$db  : Database
Contains the Database instance
__construct()  : mixed
Constructor
__destruct()  : mixed
Destructor
checkIfEmailExists()  : array<string|int, mixed>
Check if the email exists
checkIfNicknameExists()  : array<string|int, mixed>
Check if the nickname exists
endVacation()  : void
Remove vacation mode and set production to maximum
getAllPreferencesByUserId()  : array<string|int, mixed>
Get all preferences by a certain user
isEmpireActive()  : bool
Check the empire current activity
startVacation()  : bool
Start vacation mode first checking if it's possible to set
updateValidatedFields()  : void
Update validated fields
setNewDb()  : void
Creates a new Database object

Properties

Methods

__construct()

Constructor

public __construct() : mixed
Return values
mixed

__destruct()

Destructor

public __destruct() : mixed
Return values
mixed

checkIfEmailExists()

Check if the email exists

public checkIfEmailExists(string $email) : array<string|int, mixed>
Parameters
$email : string
Return values
array<string|int, mixed>

checkIfNicknameExists()

Check if the nickname exists

public checkIfNicknameExists(string $nickname) : array<string|int, mixed>
Parameters
$nickname : string
Return values
array<string|int, mixed>

endVacation()

Remove vacation mode and set production to maximum

public endVacation(int $user_id) : void
Parameters
$user_id : int
Return values
void

getAllPreferencesByUserId()

Get all preferences by a certain user

public getAllPreferencesByUserId(int $user_id) : array<string|int, mixed>
Parameters
$user_id : int
Return values
array<string|int, mixed>

isEmpireActive()

Check the empire current activity

public isEmpireActive(int $user_id) : bool
Parameters
$user_id : int
Return values
bool

startVacation()

Start vacation mode first checking if it's possible to set

public startVacation(int $user_id) : bool
Parameters
$user_id : int
Return values
bool

updateValidatedFields()

Update validated fields

public updateValidatedFields(array<string|int, mixed> $fields, int $user_id) : void
Parameters
$fields : array<string|int, mixed>
$user_id : int
Return values
void

setNewDb()

Creates a new Database object

private setNewDb() : void
Return values
void

Search results