Missions
extends Model
in package
Missions Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- deleteAcsFleetById() : void
- Delete ACS fleet by ID
- deleteFleetById() : void
- Delete a fleet by its ID
- deleteMultipleFleetsByIds() : void
- Delete multiple fleets by a set of provided ids
- getAllAcsFleetsByGroupId() : array<string|int, mixed>
- Get all fleets by ACS fleet ID
- getAllFleetsByEndCoordsAndTimes() : array<string|int, mixed>
- Get all fleets by end coordinates, start time and stay time
- getAllPlanetDataByCoords() : array<string|int, mixed>
- Get all planet data
- getAllUserDataByUserId() : array<string|int, mixed>
- Get all user data by user ID
- getDestroyerData() : array<string|int, mixed>
- Get destroyer data
- getFriendlyPlanetData() : void
- Get friendly planet data
- getInquiredUserDataByCords() : array<string|int, mixed>
- Get user data that's going to be inquired (spied)
- getMissileAttackerDataByCoords() : void
- Get all missiles attacker data by coords
- getMissileTargetDataByCoords() : void
- Get all missiles target data by coords
- getMoonIdByCoords() : array<string|int, mixed>
- Get moon id by coords
- getPlanetAndUserCountsCounts() : array<string|int, mixed>
- Get planet and user data before colonization can take place
- getPlanetDebris() : void
- Update planet debris field and make the fleet return
- getSpyUserDataByCords() : array<string|int, mixed>
- Get user data that's going to start the spy process
- getTargetToDestroyData() : array<string|int, mixed>
- Get target to destroy data
- getTechnologiesByUserId() : array<string|int, mixed>
- Get user technologies by the provided user ID
- insertReport() : void
- Insert a new record in the reports table
- updateAcsFleetStatusByGroupId() : void
- Update ACS fleet status by ID
- updateColonizationStatistics() : void
- Updates the points after the colonization took place
- updateColonizatonReturningFleet() : void
- Updates the fleet array and points by fleet id and coords
- updateCrystalDebrisByPlanetId() : void
- Update planet target defenses based on the attack result
- updateFleetArrayById() : void
- updateFleetDataToReturn() : void
- Update destroy fleet data and make it return
- updateFleetResourcesById() : void
- Updates the fleet resources with what we found on the expedition
- updateFleetsStatusToMakeThemReturn() : void
- updateFleetStatusToReturnById() : void
- Update fleet status to return by ID
- updateFleetStatusToStayById() : void
- Update fleet status to stay by ID
- updatePlanetDataAfterDestruction() : void
- Update planet data after its destruction
- updatePlanetDebrisByCoords() : void
- Update planet debris by coordinates
- updatePlanetDebrisFieldAndFleet() : void
- Update planet debris field and make the fleet return
- updatePlanetDefenses() : void
- Update planet target defenses based on the attack result
- updatePlanetLossesById() : void
- Update planet losses by Id
- updatePlanetResourcesByCoords() : void
- Update planet resources by the provided coords and with the provided data
- updatePlanetsShipsByCoords() : void
- Update planet ships by the provided coords and with the provided data
- updateReturningFleetData() : void
- Update returning fleet steal resources
- updateReturningFleetResources() : void
- Update planet target defenses based on the attack result
- updateUserCurrentPlanetByCoordsAndUserId() : void
- Update user current planet, to avoid that they get stuck on a deleted moon
- 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 —deleteAcsFleetById()
Delete ACS fleet by ID
public
deleteAcsFleetById(int $fleet_group_id) : void
Parameters
- $fleet_group_id : int
-
Fleet group ID
Return values
void —deleteFleetById()
Delete a fleet by its ID
public
deleteFleetById(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleet ID
Return values
void —deleteMultipleFleetsByIds()
Delete multiple fleets by a set of provided ids
public
deleteMultipleFleetsByIds(string $id_string) : void
Parameters
- $id_string : string
-
String of IDS
Return values
void —getAllAcsFleetsByGroupId()
Get all fleets by ACS fleet ID
public
getAllAcsFleetsByGroupId(int $fleet_group_id) : array<string|int, mixed>
Parameters
- $fleet_group_id : int
Return values
array<string|int, mixed> —getAllFleetsByEndCoordsAndTimes()
Get all fleets by end coordinates, start time and stay time
public
getAllFleetsByEndCoordsAndTimes([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to get the fleets
Return values
array<string|int, mixed> —getAllPlanetDataByCoords()
Get all planet data
public
getAllPlanetDataByCoords([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
array<string|int, mixed> —getAllUserDataByUserId()
Get all user data by user ID
public
getAllUserDataByUserId(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
-
User ID
Return values
array<string|int, mixed> —getDestroyerData()
Get destroyer data
public
getDestroyerData([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
array<string|int, mixed> —getFriendlyPlanetData()
Get friendly planet data
public
getFriendlyPlanetData([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —getInquiredUserDataByCords()
Get user data that's going to be inquired (spied)
public
getInquiredUserDataByCords([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
array<string|int, mixed> —getMissileAttackerDataByCoords()
Get all missiles attacker data by coords
public
getMissileAttackerDataByCoords([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Coords
Return values
void —getMissileTargetDataByCoords()
Get all missiles target data by coords
public
getMissileTargetDataByCoords([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Coords
Return values
void —getMoonIdByCoords()
Get moon id by coords
public
getMoonIdByCoords([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Moon coords
Return values
array<string|int, mixed> —getPlanetAndUserCountsCounts()
Get planet and user data before colonization can take place
public
getPlanetAndUserCountsCounts([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
User and Planet data
Return values
array<string|int, mixed> —getPlanetDebris()
Update planet debris field and make the fleet return
public
getPlanetDebris([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —getSpyUserDataByCords()
Get user data that's going to start the spy process
public
getSpyUserDataByCords([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
array<string|int, mixed> —getTargetToDestroyData()
Get target to destroy data
public
getTargetToDestroyData([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
array<string|int, mixed> —getTechnologiesByUserId()
Get user technologies by the provided user ID
public
getTechnologiesByUserId(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
-
User ID
Return values
array<string|int, mixed> —insertReport()
Insert a new record in the reports table
public
insertReport([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Report data
Return values
void —updateAcsFleetStatusByGroupId()
Update ACS fleet status by ID
public
updateAcsFleetStatusByGroupId(string $fleet_group_id) : void
Parameters
- $fleet_group_id : string
-
Fleet group
Return values
void —updateColonizationStatistics()
Updates the points after the colonization took place
public
updateColonizationStatistics([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateColonizatonReturningFleet()
Updates the fleet array and points by fleet id and coords
public
updateColonizatonReturningFleet([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateCrystalDebrisByPlanetId()
Update planet target defenses based on the attack result
public
updateCrystalDebrisByPlanetId([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateFleetArrayById()
public
updateFleetArrayById([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateFleetDataToReturn()
Update destroy fleet data and make it return
public
updateFleetDataToReturn(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
-
Data to update
Return values
void —updateFleetResourcesById()
Updates the fleet resources with what we found on the expedition
public
updateFleetResourcesById([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateFleetsStatusToMakeThemReturn()
public
updateFleetsStatusToMakeThemReturn([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateFleetStatusToReturnById()
Update fleet status to return by ID
public
updateFleetStatusToReturnById(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleet ID
Return values
void —updateFleetStatusToStayById()
Update fleet status to stay by ID
public
updateFleetStatusToStayById(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleet ID
Return values
void —updatePlanetDataAfterDestruction()
Update planet data after its destruction
public
updatePlanetDataAfterDestruction([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updatePlanetDebrisByCoords()
Update planet debris by coordinates
public
updatePlanetDebrisByCoords([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to run the query
Return values
void —updatePlanetDebrisFieldAndFleet()
Update planet debris field and make the fleet return
public
updatePlanetDebrisFieldAndFleet([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updatePlanetDefenses()
Update planet target defenses based on the attack result
public
updatePlanetDefenses([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updatePlanetLossesById()
Update planet losses by Id
public
updatePlanetLossesById([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updatePlanetResourcesByCoords()
Update planet resources by the provided coords and with the provided data
public
updatePlanetResourcesByCoords([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updatePlanetsShipsByCoords()
Update planet ships by the provided coords and with the provided data
public
updatePlanetsShipsByCoords([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —updateReturningFleetData()
Update returning fleet steal resources
public
updateReturningFleetData([type $data = [] ]) : void
Parameters
- $data : type = []
Return values
void —updateReturningFleetResources()
Update planet target defenses based on the attack result
public
updateReturningFleetResources(int $fleet_id) : void
Parameters
- $fleet_id : int
-
Fleet ID
Return values
void —updateUserCurrentPlanetByCoordsAndUserId()
Update user current planet, to avoid that they get stuck on a deleted moon
public
updateUserCurrentPlanetByCoordsAndUserId([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
-
Data to update
Return values
void —setNewDb()
Creates a new Database object
private
setNewDb() : void