Query
extends AbstractStatus
in package
Class Query
Table of Contents
Properties
- $encoding : string
- $host : string
- $info : array<string, mixed>
- $players : array<string|int, string>
- $port : int
- $resolveSRV : bool
- $socket : resource|null
- $timeout : int
Methods
- __construct() : mixed
- __destruct() : mixed
- connect() : Query
- disconnect() : void
- getCountPlayers() : int
- getEncoding() : string
- getHost() : string
- getInfo() : array<string, mixed>
- Returns the obtained host information
- getMaxPlayers() : int
- getPlayers() : array<string|int, string>
- Returns a potential list of players
- getPort() : int
- getTimeout() : int
- isConnected() : bool
- Returns information about whether the connection was successful, it can also tell if the server is online
- isResolveSRV() : bool
- setEncoding() : void
- setTimeout() : void
- Sets the time to get resources
- _connect() : void
- encoding() : array<string|int, mixed>
- getChallenge() : string
- Copied from https://github.com/xPaw/PHP-Minecraft-Query/
- getStatus() : void
- Copied from https://github.com/xPaw/PHP-Minecraft-Query/
- resolveSRV() : array<string, string|null>
- writeData() : string|null
- Copied from https://github.com/xPaw/PHP-Minecraft-Query/
Properties
$encoding
protected
string
$encoding
= 'UTF-8'
$host
protected
string
$host
$info
protected
array<string, mixed>
$info
= []
$players
protected
array<string|int, string>
$players
= []
$port
protected
int
$port
$resolveSRV
protected
bool
$resolveSRV
$socket
protected
resource|null
$socket
= null
$timeout
protected
int
$timeout
Methods
__construct()
public
__construct(string $host[, int $port = 25565 ][, int $timeout = 3 ][, bool $resolveSRV = true ]) : mixed
Parameters
- $host : string
- $port : int = 25565
- $timeout : int = 3
- $resolveSRV : bool = true
Tags
__destruct()
public
__destruct() : mixed
connect()
public
connect() : Query
Tags
Return values
Querydisconnect()
public
disconnect() : void
getCountPlayers()
public
getCountPlayers() : int
Tags
Return values
intgetEncoding()
public
getEncoding() : string
Return values
stringgetHost()
public
getHost() : string
Return values
stringgetInfo()
Returns the obtained host information
public
getInfo() : array<string, mixed>
Tags
Return values
array<string, mixed>getMaxPlayers()
public
getMaxPlayers() : int
Tags
Return values
intgetPlayers()
Returns a potential list of players
public
getPlayers() : array<string|int, string>
Tags
Return values
array<string|int, string>getPort()
public
getPort() : int
Return values
intgetTimeout()
public
getTimeout() : int
Return values
intisConnected()
Returns information about whether the connection was successful, it can also tell if the server is online
public
isConnected() : bool
Tags
Return values
boolisResolveSRV()
public
isResolveSRV() : bool
Return values
boolsetEncoding()
public
setEncoding(string $encoding) : void
Parameters
- $encoding : string
setTimeout()
Sets the time to get resources
public
setTimeout(int $timeout) : void
Parameters
- $timeout : int
Tags
_connect()
protected
_connect(string $host, int $port) : void
Parameters
- $host : string
- $port : int
Tags
encoding()
protected
encoding(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>getChallenge()
Copied from https://github.com/xPaw/PHP-Minecraft-Query/
protected
getChallenge() : string
Tags
Return values
stringgetStatus()
Copied from https://github.com/xPaw/PHP-Minecraft-Query/
protected
getStatus() : void
Tags
resolveSRV()
protected
resolveSRV(string $host) : array<string, string|null>
Parameters
- $host : string
Return values
array<string, string|null>writeData()
Copied from https://github.com/xPaw/PHP-Minecraft-Query/
protected
writeData(int $command[, string $append = "" ]) : string|null
Parameters
- $command : int
- $append : string = ""