ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery Class Reference

Provides low-level methods for ServerQuery communication with a TeamSpeak 3 Server. More...

Inheritance diagram for PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery:
PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter PlanetTeamSpeak\TeamSpeak3Framework\Adapter\MockServerQuery

Public Member Functions

 __destruct ()
 request (string $cmd, bool $throw=true)
 wait ()
 prepare (string $cmd, array $params=[])
 getQueryLastTimestamp ()
 getQueryCount ()
 getQueryRuntime ()
 getHost ()
Public Member Functions inherited from PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter
 __construct (array $options)
 __sleep ()
 __wakeup ()
 getProfiler ()
 getTransport ()
 getTransportHost ()
 getTransportPort ()

Protected Member Functions

 syn ()
Protected Member Functions inherited from PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter
 initTransport (array $options, string $transport=TCP::class)

Protected Attributes

Host $host = null
int $timer = null
int $count = 0
array $block = ["help"]
Protected Attributes inherited from PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter
array $options = null
Transport $transport = null

Detailed Description

Provides low-level methods for ServerQuery communication with a TeamSpeak 3 Server.

Definition at line 21 of file ServerQuery.php.

Constructor & Destructor Documentation

◆ __destruct()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::__destruct ( )

The ServerQuery destructor.

Returns
void

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter.

Definition at line 79 of file ServerQuery.php.

Member Function Documentation

◆ getHost()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::getHost ( )

Returns the Host object of the current connection.

Returns
Host|null

Definition at line 256 of file ServerQuery.php.

◆ getQueryCount()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::getQueryCount ( )

Returns the number of queries executed on the server.

Returns
integer

Definition at line 236 of file ServerQuery.php.

◆ getQueryLastTimestamp()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::getQueryLastTimestamp ( )

Returns the timestamp of the last command.

Returns
int|null

Definition at line 226 of file ServerQuery.php.

◆ getQueryRuntime()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::getQueryRuntime ( )

Returns the total runtime in microseconds of all queries.

Returns
float

Definition at line 246 of file ServerQuery.php.

◆ prepare()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::prepare ( string $cmd,
array $params = [] )

Uses given parameters and returns a prepared ServerQuery command.

Parameters
string$cmd
array$params
Returns
string

Definition at line 168 of file ServerQuery.php.

◆ request()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::request ( string $cmd,
bool $throw = true )

Sends a prepared command to the server and returns the result.

Parameters
string$cmd
boolean$throw
Returns
Reply
Exceptions
AdapterException|ServerQueryException

Definition at line 103 of file ServerQuery.php.

◆ syn()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::syn ( )
protected

Connects the Transport object and performs initial actions on the remote server.

Returns
void
Exceptions
AdapterException

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Adapter\Adapter.

Reimplemented in PlanetTeamSpeak\TeamSpeak3Framework\Adapter\MockServerQuery.

Definition at line 58 of file ServerQuery.php.

◆ wait()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::wait ( )

Waits for the server to send a notification message and returns the result.

Returns
Event
Exceptions
AdapterException

Definition at line 145 of file ServerQuery.php.

Member Data Documentation

◆ $block

array PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::$block = ["help"]
protected

Definition at line 49 of file ServerQuery.php.

◆ $count

int PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::$count = 0
protected

Definition at line 42 of file ServerQuery.php.

◆ $host

Host PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::$host = null
protected

Definition at line 28 of file ServerQuery.php.

◆ $timer

int PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery::$timer = null
protected

Definition at line 35 of file ServerQuery.php.


The documentation for this class was generated from the following file: