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

Provides methods to analyze and format a ServerQuery reply. More...

Public Member Functions

 __construct (array $rpl, string $cmd="", Host $con=null, bool $exp=true)
 toString ()
 toLines ()
 toTable ()
 toArray ()
 toAssocArray ($ident)
 toList ()
 toObjectArray ()
 getCommandString ()
 getNotifyEvents ()
 getErrorProperty (string $ident, mixed $default=null)

Protected Member Functions

 fetchError (StringHelper $err)
 fetchReply (array $rpl)

Protected Attributes

StringHelper $cmd
StringHelper $rpl = null
Host $con
array $err = []
array $evt = []
bool $exp = true

Detailed Description

Provides methods to analyze and format a ServerQuery reply.

Definition at line 18 of file Reply.php.

Constructor & Destructor Documentation

◆ __construct()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::__construct ( array $rpl,
string $cmd = "",
Host $con = null,
bool $exp = true )

Creates a new PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply object.

Parameters
array$rpl
null$cmd
Host | null$con
boolean$exp
Exceptions
AdapterException
ServerQueryException

Definition at line 72 of file Reply.php.

Member Function Documentation

◆ fetchError()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::fetchError ( StringHelper $err)
protected

Parses a ServerQuery error and throws a PlanetTeamSpeak\TeamSpeak3Framework\Exception\ServerQueryException object if there's an error.

Parameters
StringHelper$err
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 264 of file Reply.php.

◆ fetchReply()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::fetchReply ( array $rpl)
protected

Parses a ServerQuery reply and creates a PlanetTeamSpeak\TeamSpeak3Framework\Helper\StringHelper object.

Parameters
array$rpl
Returns
void
Exceptions
AdapterException

Definition at line 300 of file Reply.php.

◆ getCommandString()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::getCommandString ( )

Returns the command used to get this reply.

Returns
StringHelper

Definition at line 228 of file Reply.php.

◆ getErrorProperty()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::getErrorProperty ( string $ident,
mixed $default = null )

Returns the value for a specified error property.

Parameters
string$ident
mixed | null$default
Returns
mixed

Definition at line 250 of file Reply.php.

◆ getNotifyEvents()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::getNotifyEvents ( )

Returns an array of events that occured before or during this reply.

Returns
array

Definition at line 238 of file Reply.php.

◆ toArray()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toArray ( )

Returns a multi-dimensional array containing the reply splitted in multiple rows and columns.

Returns
array

Definition at line 143 of file Reply.php.

◆ toAssocArray()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toAssocArray ( $ident)

Returns a multi-dimensional assoc array containing the reply splitted in multiple rows and columns. The identifier specified by key will be used while indexing the array.

Parameters
$ident
Returns
array
Exceptions
ServerQueryException

Definition at line 175 of file Reply.php.

◆ toLines()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toLines ( )

Returns the reply as a standard PHP array where each element represents one item.

Returns
array

Definition at line 97 of file Reply.php.

◆ toList()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toList ( )

Returns an array containing the reply split in multiple rows and columns.

Returns
array

Definition at line 196 of file Reply.php.

◆ toObjectArray()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toObjectArray ( )

Returns an array containing stdClass objects.

Returns
array

Definition at line 212 of file Reply.php.

◆ toString()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toString ( )

Returns the reply as an PlanetTeamSpeak\TeamSpeak3Framework\Helper\StringHelper object.

Returns
StringHelper

Definition at line 87 of file Reply.php.

◆ toTable()

PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::toTable ( )

Returns the reply as a standard PHP array where each element represents one item in table format.

Returns
array

Definition at line 119 of file Reply.php.

Member Data Documentation

◆ $cmd

StringHelper PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$cmd
protected

Definition at line 25 of file Reply.php.

◆ $con

Host PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$con
protected

Definition at line 39 of file Reply.php.

◆ $err

array PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$err = []
protected

Definition at line 46 of file Reply.php.

◆ $evt

array PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$evt = []
protected

Definition at line 53 of file Reply.php.

◆ $exp

bool PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$exp = true
protected

Definition at line 60 of file Reply.php.

◆ $rpl

StringHelper PlanetTeamSpeak\TeamSpeak3Framework\Adapter\ServerQuery\Reply::$rpl = null
protected

Definition at line 32 of file Reply.php.


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