XG Proyect

Fleet4 extends BaseController
in package

Fleet4 Class

Table of Contents

MODULE_ID  = 8
REDIRECT_TARGET  = 'game.php?page=movement'
$objects  : Objects
Contains the whole set of objects by request
$page  : Page
Contains the Page object
$planet  : array<string|int, mixed>
Contains the current planet data
$template  : Template
Contains the Template object
$user  : array<string|int, mixed>
Contains the current user data
$userLibrary  : User
Contains the User object
$_clean_input_data  : array<string|int, mixed>
Already filtered POST data
$_fleet_data  : array<string|int, mixed>
$_fleet_ships  : array<string|int, mixed>
$_fleet_storage  : int
$_fleets  : Fleets
$_occupied_planet  : bool
$_own_planet  : bool
$_premium  : Premium
$_research  : Research
$_target_data  : array<string|int, mixed>
__construct()  : mixed
Constructor
index()  : void
Users land here
loadLang()  : void
Load a language file using CI Library
loadModel()  : void
Load the provided model, support a dir path
getObjects()  : array<string|int, mixed>
Will be removed
getPlanetData()  : array<string|int, mixed>
Will be removed
getTemplate()  : array<string|int, mixed>
Will be removed
getUserData()  : array<string|int, mixed>
Will be removed
buildPage()  : void
Build the page
getFleetData()  : array<string|int, mixed>
Get fleet data
getSessionShips()  : string
Get session set ships
getTarget()  : void
Get target user info and planet info
getTargetData()  : array<string|int, mixed>
Get the target data
runValidations()  : bool
Run multiple validations
sendFleet()  : void
Send the fleet with the collected data
setInputsData()  : array<string|int, mixed>
Set inputs data
setUpFleets()  : void
Creates a new ships object that will handle all the ships creation methods and actions
showMessage()  : void
Show message with some default fleet values
validateAcs()  : bool
Validate any current ACS
validateAdmin()  : bool
Validate both players level
validateFleets()  : bool
Validate the amount of fleets
validateMission()  : bool
Validate the mission
validateNoobProtection()  : bool
Validate noob protection
validateOwnVacations()  : bool
Validate vacations for both players
validateResources()  : bool
Validate the resources
validateShips()  : bool
Validate if the received amount of ships is valid
validateTargetVacations()  : bool
Validate vacations for both players
validateTime()  : bool
Validate fleet times

Constants

MODULE_ID

public int MODULE_ID = 8

REDIRECT_TARGET

public string REDIRECT_TARGET = 'game.php?page=movement'

Properties

$planet

Contains the current planet data

protected array<string|int, mixed> $planet = []

$user

Contains the current user data

protected array<string|int, mixed> $user = []

$userLibrary

Contains the User object

protected User $userLibrary = null

$_clean_input_data

Already filtered POST data

private array<string|int, mixed> $_clean_input_data = []

$_fleet_data

private array<string|int, mixed> $_fleet_data = ['fleet_owner' => 0, 'fleet_mission' => 0, 'fleet_amount' => 0, 'fleet_array' => '', 'fleet_start_time' => 0, 'fleet_start_galaxy' => 0, 'fleet_start_system' => 0, 'fleet_start_planet' => 0, 'fleet_start_type' => 0, 'fleet_end_time' => 0, 'fleet_end_stay' => 0, 'fleet_end_galaxy' => 0, 'fleet_end_system' => 0, 'fleet_end_planet' => 0, 'fleet_end_type' => 0, 'fleet_resource_metal' => 0, 'fleet_resource_crystal' => 0, 'fleet_resource_deuterium' => 0, 'fleet_fuel' => 0, 'fleet_target_owner' => 0, 'fleet_group' => 0]

$_fleet_ships

private array<string|int, mixed> $_fleet_ships = []

$_fleet_storage

private int $_fleet_storage = 0

$_fleets

private Fleets $_fleets = null

$_occupied_planet

private bool $_occupied_planet = false

$_own_planet

private bool $_own_planet = false

$_premium

private Premium $_premium = null

$_research

private Research $_research = null

$_target_data

private array<string|int, mixed> $_target_data = []

Methods

__construct()

Constructor

public __construct() : mixed
Return values
mixed

index()

Users land here

public index() : void
Return values
void

loadLang()

Load a language file using CI Library

public loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
$language_file : string|array<string|int, mixed>
Return values
void

loadModel()

Load the provided model, support a dir path

public loadModel(string $class) : void
Parameters
$class : string

Mandatory field, if not will throw an exception

Tags
throws
Exception
Return values
void

getObjects()

Will be removed

protected getObjects() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getPlanetData()

Will be removed

protected getPlanetData() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getTemplate()

Will be removed

protected getTemplate() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getUserData()

Will be removed

protected getUserData() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

buildPage()

Build the page

private buildPage() : void
Return values
void

getFleetData()

Get fleet data

private getFleetData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSessionShips()

Get session set ships

private getSessionShips() : string
Return values
string

getTarget()

Get target user info and planet info

private getTarget() : void
Return values
void

getTargetData()

Get the target data

private getTargetData() : array<string|int, mixed>
Return values
array<string|int, mixed>

runValidations()

Run multiple validations

private runValidations() : bool
Return values
bool

sendFleet()

Send the fleet with the collected data

private sendFleet() : void
Return values
void

setInputsData()

Set inputs data

private setInputsData() : array<string|int, mixed>
Return values
array<string|int, mixed>

setUpFleets()

Creates a new ships object that will handle all the ships creation methods and actions

private setUpFleets() : void
Return values
void

showMessage()

Show message with some default fleet values

private showMessage(type $message) : void
Parameters
$message : type
Return values
void

validateAcs()

Validate any current ACS

private validateAcs() : bool
Return values
bool

validateAdmin()

Validate both players level

private validateAdmin() : bool
Return values
bool

validateFleets()

Validate the amount of fleets

private validateFleets() : bool
Return values
bool

validateMission()

Validate the mission

private validateMission() : bool
Return values
bool

validateNoobProtection()

Validate noob protection

private validateNoobProtection() : bool
Return values
bool

validateOwnVacations()

Validate vacations for both players

private validateOwnVacations() : bool
Return values
bool

validateResources()

Validate the resources

private validateResources() : bool
Return values
bool

validateShips()

Validate if the received amount of ships is valid

private validateShips() : bool
Return values
bool

validateTargetVacations()

Validate vacations for both players

private validateTargetVacations() : bool
Return values
bool

validateTime()

Validate fleet times

private validateTime() : bool
Return values
bool

Search results