Server
class Server extends UrlModel implements NamedModel
A BZFlag server
Constants
TABLE |
The name of the database table used for queries |
CREATE_PERMISSION |
|
EDIT_PERMISSION |
|
SOFT_DELETE_PERMISSION |
|
HARD_DELETE_PERMISSION |
|
Methods
Add a new server
Update the server with current bzfquery information return self
Checks if the server is online (listed on the public list server)
Checks if the server has players
Gets the number of players on the server
Gets the players on the server
Checks if the last update is older than or equal to the update interval
The ApiKey assigned to this server
Gets the server's ip address
Get the server's name
Get the domain of the server
Get the port of the server
Get the server's IP address or hostname
Get when the server information was last updated
Get the country the server is in
Returns the amount of time passed since the server was last updated
Set the id of the country of the server
Get all the servers in the database that have an active status
Get a query builder for servers
Details
at line line 115
static Server
addServer(string $name, string $domain, string $port, int $country, int $owner)
Add a new server
at line line 137
forceUpdate()
Update the server with current bzfquery information return self
at line line 166
bool
isOnline()
Checks if the server is online (listed on the public list server)
at line line 175
bool
hasPlayers()
Checks if the server has players
at line line 184
int
numPlayers()
Gets the number of players on the server
at line line 193
array
getPlayers()
Gets the players on the server
at line line 206
bool
staleInfo()
Checks if the last update is older than or equal to the update interval
at line line 219
CachedModel|int|null|Server
getApiKey()
The ApiKey assigned to this server
at line line 228
string
getServerIp()
Gets the server's ip address
at line line 237
string
getName()
Get the server's name
at line line 247
string
getDomain()
Get the domain of the server
at line line 257
int
getPort()
Get the port of the server
at line line 266
string
getAddress()
Get the server's IP address or hostname
at line line 275
TimeDate
getUpdated()
Get when the server information was last updated
at line line 284
Country
getCountry()
Get the country the server is in
at line line 293
Player
getOwner()
Get the owner of the server
at line line 302
TimeDate
getLastUpdate()
Returns the amount of time passed since the server was last updated
at line line 314
Server
setName(string $name)
Set the name of the server
at line line 328
Server
setAddress(string $address)
deprecated
deprecated
Set the address of the server
at line line 345
Server
setDomain($domain)
Set the domain of the server
at line line 357
Server
setPort($port)
Set the port of the server
at line line 369
Server
setOwner(int $ownerId)
Set the id of the owner of the server
at line line 381
Server
setCountry(int $countryId)
Set the id of the country of the server
at line line 390
static Server[]
getServers()
Get all the servers in the database that have an active status
at line line 399
static QueryBuilder
getQueryBuilder()
Get a query builder for servers