![]() |
TeamSpeak 3 PHP Framework
1.1.16
Copyright © Planet TeamSpeak. All rights reserved.
|
Provides methods to analyze and format a ServerQuery reply. More...
Public Member Functions | |
| __construct (array $rpl, $cmd=null, TeamSpeak3_Node_Host $con=null) | |
| Creates a new TeamSpeak3_Adapter_ServerQuery_Reply object. | |
| toString () | |
| Returns the reply as an TeamSpeak3_Helper_String object. | |
| toLines () | |
| Returns the reply as a standard PHP array where each element represents one item. | |
| toTable () | |
| Returns the reply as a standard PHP array where each element represents one item in table format. | |
| toArray () | |
| Returns a multi-dimensional array containing the reply splitted in multiple rows and columns. | |
| toAssocArray ($ident) | |
| Returns a multi-dimensional assoc array containing the reply splitted in multiple rows and columns. | |
| toList () | |
| Returns an array containing the reply splitted in multiple rows and columns. | |
| toObjectArray () | |
| Returns an array containing stdClass objects. | |
| getCommandString () | |
| Returns the command used to get this reply. | |
| getNotifyEvents () | |
| Returns an array of events that occured before or during this reply. | |
| getErrorProperty ($ident, $default=null) | |
| Returns the value for a specified error property. | |
Protected Member Functions | |
| fetchError ($err) | |
| Parses a ServerQuery error and throws a TeamSpeak3_Adapter_ServerQuery_Exception object if there's an error. | |
| fetchReply ($rpl) | |
| Parses a ServerQuery reply and creates a TeamSpeak3_Helper_String object. | |
Protected Attributes | |
| $cmd = null | |
| $rpl = null | |
| $con = null | |
| $err = array() | |
| $evt = array() | |
Provides methods to analyze and format a ServerQuery reply.
| TeamSpeak3_Adapter_ServerQuery_Reply::__construct | ( | array | $rpl, |
$cmd = null, |
|||
| TeamSpeak3_Node_Host | $con = null |
||
| ) |
Creates a new TeamSpeak3_Adapter_ServerQuery_Reply object.
| array | $rpl | |
| string | $cmd | |
| TeamSpeak3_Node_Host | $con |
Definition at line 77 of file Reply.php.
References fetchError(), and fetchReply().
| TeamSpeak3_Adapter_ServerQuery_Reply::toString | ( | ) |
Returns the reply as an TeamSpeak3_Helper_String object.
Definition at line 91 of file Reply.php.
Referenced by toAssocArray(), and toLines().
| TeamSpeak3_Adapter_ServerQuery_Reply::toLines | ( | ) |
Returns the reply as a standard PHP array where each element represents one item.
Definition at line 101 of file Reply.php.
References TeamSpeak3\SEPARATOR_LIST, and toString().
Referenced by toTable().
| TeamSpeak3_Adapter_ServerQuery_Reply::toTable | ( | ) |
Returns the reply as a standard PHP array where each element represents one item in table format.
Definition at line 120 of file Reply.php.
References TeamSpeak3\SEPARATOR_CELL, and toLines().
Referenced by toArray().
| TeamSpeak3_Adapter_ServerQuery_Reply::toArray | ( | ) |
Returns a multi-dimensional array containing the reply splitted in multiple rows and columns.
Definition at line 144 of file Reply.php.
References TeamSpeak3\SEPARATOR_PAIR, and toTable().
Referenced by toAssocArray(), toList(), and toObjectArray().
| TeamSpeak3_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.
| $key |
Definition at line 176 of file Reply.php.
References toArray(), and toString().
| TeamSpeak3_Adapter_ServerQuery_Reply::toList | ( | ) |
| TeamSpeak3_Adapter_ServerQuery_Reply::toObjectArray | ( | ) |
| TeamSpeak3_Adapter_ServerQuery_Reply::getCommandString | ( | ) |
Returns the command used to get this reply.
| TeamSpeak3_Adapter_ServerQuery_Reply::getNotifyEvents | ( | ) |
| TeamSpeak3_Adapter_ServerQuery_Reply::getErrorProperty | ( | $ident, | |
$default = null |
|||
| ) |
Returns the value for a specified error property.
| string | $ident | |
| mixed | $default |
Definition at line 257 of file Reply.php.
Referenced by fetchError().
|
protected |
Parses a ServerQuery error and throws a TeamSpeak3_Adapter_ServerQuery_Exception object if there's an error.
| string | $err |
| TeamSpeak3_Adapter_ServerQuery_Exception |
Definition at line 270 of file Reply.php.
References getErrorProperty(), TeamSpeak3_Helper_Signal\getInstance(), TeamSpeak3\SEPARATOR_CELL, and TeamSpeak3\SEPARATOR_PAIR.
Referenced by __construct().
|
protected |
Parses a ServerQuery reply and creates a TeamSpeak3_Helper_String object.
| string | $rpl |
Definition at line 315 of file Reply.php.
References TeamSpeak3\EVENT, TeamSpeak3\GREET, and TeamSpeak3\SEPARATOR_LIST.
Referenced by __construct().