Constants

TABLE_SERVERS

TABLE_SERVERS

CB_TEAM_MODE_CHANGED

CB_TEAM_MODE_CHANGED

Properties

$index

$index : 

Type

$ip

$ip : 

Type

$port

$port : 

Type

$p2pPort

$p2pPort : 

Type

$login

$login : 

Type

$titleId

$titleId : 

Type

$teamMode

$teamMode : 

Type

Methods

getUsageInformation()

getUsageInformation() 

Gets Information about the Class, and a List of the Public Method

__construct()

__construct(\ManiaControl\ManiaControl  $maniaControl) 

Construct a new Server

Parameters

\ManiaControl\ManiaControl $maniaControl

chatUpTime()

chatUpTime(array  $chatCallback, \ManiaControl\Players\Player  $player) 

Displays how long the Server is running already in the Chat

Parameters

array $chatCallback
\ManiaControl\Players\Player $player

loadConfig()

loadConfig() : \ManiaControl\Server\Config

Load the server configuration from the config XML

Returns

\ManiaControl\Server\Config

getAllServers()

getAllServers() : array<mixed,\stdClass>

Gets all Servers from the Database

Returns

array<mixed,\stdClass>

getServerLoginByIndex()

getServerLoginByIndex(integer  $index) : string

Get Server Login by Index

Parameters

integer $index

Returns

string

onInit()

onInit() 

Handle OnInit Callback

getValidationReplay()

getValidationReplay(string  $login) : string

Retrieve Validation Replay for the given Player

Parameters

string $login

Returns

string

getGhostReplay()

getGhostReplay(string  $login) : string

Retrieve Ghost Replay for the given Player

Parameters

string $login

Returns

string

checkAccess()

checkAccess(string  $directory) : boolean

Check if ManiaControl has Access to the given Directory

Parameters

string $directory

Returns

boolean

getGameMode()

getGameMode(boolean  $stringValue = false, integer  $parseValue = null) : integer

Fetch the current Game Mode

Parameters

boolean $stringValue
integer $parseValue

Returns

integer —

| string

waitForStatus()

waitForStatus(integer  $statusCode = 4) : boolean

Wait for the Server to have the given Status

Parameters

integer $statusCode

Returns

boolean

setTeamMode()

setTeamMode(boolean  $teamMode = true) 

Set whether the Server Runs a Team-Based Mode or not

Parameters

boolean $teamMode

isTeamMode()

isTeamMode() : boolean

Check if the Server Runs a Team-Based Mode

Returns

boolean

getJoinLink()

getJoinLink() : string

Build the join link

Returns

string

isEmpty()

isEmpty() : boolean

Check if the Servers is empty

Returns

boolean

initTables()

initTables() : boolean

Initialize necessary Database Tables

Returns

boolean

updateProperties()

updateProperties() 

Refetch the Server Properties