TeamSpeak 3 PHP Framework
Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
|
Class describing a TeamSpeak 3 server instance and all it's parameters. More...
Public Member Functions | |
__construct (TeamSpeak3_Adapter_ServerQuery $squery) | |
The TeamSpeak3_Node_Host constructor. More... | |
__toString () | |
Returns a string representation of this node. More... | |
__wakeup () | |
Re-authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials and re-selects a previously selected virtual server. More... | |
bindingList ($subsystem="voice") | |
Returns a list of IP addresses used by the server instance on multi-homed machines. More... | |
getAdapter () | |
Returns the underlying TeamSpeak3_Adapter_ServerQuery object. More... | |
getAdapterHost () | |
Returns the hostname or IPv4 address the adapter is connected to. More... | |
getAdapterPort () | |
Returns the network port the adapter is connected to. More... | |
getExcludeQueryClients () | |
Returns the option to decide whether ServerQuery clients should be excluded from node lists or not. More... | |
getIcon () | |
Returns the name of a possible icon to display the node object. More... | |
getLoadClientlistFirst () | |
Returns the option to decide whether offline servers will be started in virtual mode by default or not. More... | |
getPredefinedQueryName () | |
Returns the pre-defined nickname for ServerQuery clients which will be used automatically after selecting a virtual server. More... | |
getSymbol () | |
Returns a symbol representing the node. More... | |
getUniqueId () | |
Returns a unique identifier for the node which can be used as a HTML property. More... | |
getUseOfflineAsVirtual () | |
Returns the option to decide whether offline servers will be started in virtual mode by default or not. More... | |
logAdd ($logmsg, $loglevel=TeamSpeak3::LOGLEVEL_INFO) | |
Writes a custom entry into the server instance log. More... | |
login ($username, $password) | |
Authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials. More... | |
logout () | |
Deselects the active virtual server and logs out from the server instance. More... | |
logView ($lines=30, $begin_pos=null, $reverse=null, $instance=TRUE) | |
Displays a specified number of entries (1-100) from the servers log. More... | |
message ($msg) | |
Sends a text message to all clients on all virtual servers in the TeamSpeak 3 Server instance. More... | |
modify (array $properties) | |
Changes the server instance configuration using given properties. More... | |
permissionCats () | |
Returns a list of permission categories available on the server instance. More... | |
permissionEnds () | |
Returns a list of permission category endings available on the server instance. More... | |
permissionFind ($permid) | |
Returns the IDs of all clients, channels or groups using the permission with the specified ID. More... | |
permissionGetCategoryById ($permid) | |
Returns the internal category of the permission matching the given ID. More... | |
permissionGetGrantById ($permid) | |
Returns the internal ID of the i_needed_modify_power_* or grant permission. More... | |
permissionGetIdByName ($name) | |
Returns the ID of the permission matching the given name. More... | |
permissionGetNameById ($permid) | |
Returns the name of the permission matching the given ID. More... | |
permissionList () | |
Returns a list of permissions available on the server instance. More... | |
permissionTree () | |
Returns an array filled with all permission categories known to the server including their ID, name and parent. More... | |
selfPermCheck ($permid) | |
Returns an array containing the value of a specified permission for your own client. More... | |
serverCreate (array $properties=array()) | |
Creates a new virtual server using given properties and returns an assoc array containing the new ID and initial admin token. More... | |
serverDelete ($sid) | |
Deletes the virtual server specified by ID. More... | |
serverDeselect () | |
Deselects the active virtual server. More... | |
serverGetById ($sid) | |
Returns the TeamSpeak3_Node_Server object matching the given ID. More... | |
serverGetByName ($name) | |
Returns the first TeamSpeak3_Node_Server object matching the given name. More... | |
serverGetByPort ($port) | |
Returns the TeamSpeak3_Node_Server object matching the given port number. More... | |
serverGetByUid ($uid) | |
Returns the first TeamSpeak3_Node_Server object matching the given unique identifier. More... | |
serverGetPortById ($sid) | |
Returns the port of a virtual server matching the given ID. More... | |
serverGetSelected () | |
Returns the TeamSpeak3_Node_Server object matching the currently selected ID. More... | |
serverGroupPermAutoAssign ($sgtype, $permid, $permvalue, $permnegated=FALSE, $permskip=FALSE) | |
Adds a set of specified permissions to all regular server groups on all virtual servers. More... | |
serverGroupPermAutoRemove ($sgtype, $permid) | |
Removes a set of specified permissions from all regular server groups on all virtual servers. More... | |
serverIdGetByPort ($port) | |
Returns the ID of a virtual server matching the given port. More... | |
serverList (array $filter=array()) | |
Returns an array filled with TeamSpeak3_Node_Server objects. More... | |
serverListReset () | |
Resets the list of virtual servers. More... | |
serverSelect ($sid, $virtual =null) | |
Selects a virtual server by ID to allow further interaction. More... | |
serverSelectById ($sid, $virtual =null) | |
Alias for serverSelect(). More... | |
serverSelectByPort ($port, $virtual =null) | |
Selects a virtual server by UDP port to allow further interaction. More... | |
serverSelectedId () | |
Returns the primary ID of the selected virtual server. More... | |
serverSelectedPort () | |
Returns the primary UDP port of the selected virtual server. More... | |
serverStart ($sid) | |
Starts the virtual server specified by ID. More... | |
serverStop ($sid) | |
Stops the virtual server specified by ID. More... | |
serverStopProcess () | |
Stops the entire TeamSpeak 3 Server instance by shutting down the process. More... | |
setExcludeQueryClients ($exclude=FALSE) | |
Sets the option to decide whether ServerQuery clients should be excluded from node lists or not. More... | |
setLoadClientlistFirst ($first=FALSE) | |
Sets the option to decide whether clients should be sorted before sub-channels to support the new TeamSpeak 3 Client display mode or not. More... | |
setPredefinedQueryName ($name=null) | |
Sets a pre-defined nickname for ServerQuery clients which will be used automatically after selecting a virtual server. More... | |
setUseOfflineAsVirtual ($virtual =FALSE) | |
Sets the option to decide whether offline servers will be started in virtual mode by default or not. More... | |
version ($ident=null) | |
Returns the servers version information including platform and build number. More... | |
whoami () | |
Returns information about your current ServerQuery connection. More... | |
whoamiGet ($ident, $default=null) | |
Returns a single value from the current ServerQuery connection info. More... | |
whoamiReset () | |
Resets the current ServerQuery connection info. More... | |
whoamiSet ($ident, $value=null) | |
Sets a single value in the current ServerQuery connection info. More... | |
Public Member Functions inherited from TeamSpeak3_Node_Abstract | |
__call ($name, array $args) | |
Called whenever we're using an unknown method. More... | |
__get ($offset) | |
__set ($offset, $value) | |
__sleep () | |
Commit pending data. More... | |
__toString () | |
Returns a string representation of this node. More... | |
count () | |
current () | |
execute ($cmd, array $params=array()) | |
Prepares and executes a ServerQuery command and returns the result. More... | |
getChildren () | |
getClass ($prefix="ts3_") | |
Returns a possible classname for the node which can be used as a HTML property. More... | |
getIcon () | |
Returns the name of a possible icon to display the node object. More... | |
getId () | |
Returns the primary ID of the current node. More... | |
getInfo ($extend=TRUE, $convert=FALSE) | |
Returns all information available on this node. More... | |
getParent () | |
Returns the parent object of the current node. More... | |
getProperty ($property, $default=null) | |
Returns the specified property or a pre-defined default value from the node info array. More... | |
getSymbol () | |
Returns a symbol representing the node. More... | |
getUniqueId () | |
Returns a unique identifier for the node which can be used as a HTML property. More... | |
getViewer (TeamSpeak3_Viewer_Interface $viewer) | |
Returns the HTML code to display a TeamSpeak 3 viewer. More... | |
hasChildren () | |
hasNext () | |
iconGetName ($key) | |
Returns the internal path of the node icon. More... | |
iconIsLocal ($key) | |
Returns TRUE if the node icon has a local source. More... | |
key () | |
next () | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
prepare ($cmd, array $params=array()) | |
Uses given parameters and returns a prepared ServerQuery command. More... | |
request ($cmd, $throw=TRUE) | |
Sends a prepared command to the server and returns the result. More... | |
rewind () | |
toArray () | |
Returns an assoc array filled with current node info properties. More... | |
toString () | |
Returns a string representation of this node. More... | |
valid () | |
Protected Member Functions | |
fetchNodeInfo () | |
fetchNodeList () | |
fetchPermissionCats () | |
fetchPermissionList () | |
Protected Member Functions inherited from TeamSpeak3_Node_Abstract | |
delStorage ($key) | |
Deletes data from the internal storage array. More... | |
fetchNodeInfo () | |
fetchNodeList () | |
filterList (array $nodes=array(), array $rules=array()) | |
Filters given node list array using specified filter rules. More... | |
getStorage ($key, $default=null) | |
Returns data from the internal storage array. More... | |
resetNodeInfo () | |
resetNodeList () | |
setStorage ($key, $val) | |
Writes data to the internal storage array. More... | |
verifyNodeList () | |
Protected Attributes | |
$exclude_query_clients = FALSE | |
$permissionCats = null | |
$permissionEnds = null | |
$permissionList = null | |
$predefined_query_name = null | |
$serverList = null | |
$sort_clients_channels = FALSE | |
$start_offline_virtual = FALSE | |
$version = null | |
$whoami = null | |
Protected Attributes inherited from TeamSpeak3_Node_Abstract | |
$nodeId = 0x00 | |
$nodeInfo = array() | |
$nodeList = null | |
$parent = null | |
$server = null | |
$storage = array() | |
Class describing a TeamSpeak 3 server instance and all it's parameters.
__construct | ( | TeamSpeak3_Adapter_ServerQuery | $squery | ) |
The TeamSpeak3_Node_Host constructor.
TeamSpeak3_Adapter_ServerQuery | $squery |
__toString | ( | ) |
Returns a string representation of this node.
__wakeup | ( | ) |
Re-authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials and re-selects a previously selected virtual server.
bindingList | ( | $subsystem = "voice" | ) |
Returns a list of IP addresses used by the server instance on multi-homed machines.
getAdapter | ( | ) |
Returns the underlying TeamSpeak3_Adapter_ServerQuery object.
getAdapterHost | ( | ) |
Returns the hostname or IPv4 address the adapter is connected to.
getAdapterPort | ( | ) |
Returns the network port the adapter is connected to.
getExcludeQueryClients | ( | ) |
Returns the option to decide whether ServerQuery clients should be excluded from node lists or not.
getIcon | ( | ) |
getLoadClientlistFirst | ( | ) |
Returns the option to decide whether offline servers will be started in virtual mode by default or not.
getPredefinedQueryName | ( | ) |
Returns the pre-defined nickname for ServerQuery clients which will be used automatically after selecting a virtual server.
getUniqueId | ( | ) |
getUseOfflineAsVirtual | ( | ) |
Returns the option to decide whether offline servers will be started in virtual mode by default or not.
logAdd | ( | $logmsg, | |
$loglevel = TeamSpeak3::LOGLEVEL_INFO |
|||
) |
Writes a custom entry into the server instance log.
string | $logmsg | |
integer | $loglevel |
login | ( | $username, | |
$password | |||
) |
Authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials.
string | $username | |
string | $password |
logout | ( | ) |
Deselects the active virtual server and logs out from the server instance.
logView | ( | $lines = 30 , |
|
$begin_pos = null , |
|||
$reverse = null , |
|||
$instance = TRUE |
|||
) |
Displays a specified number of entries (1-100) from the servers log.
integer | $lines | |
integer | $begin_pos | |
boolean | $reverse | |
boolean | $instance |
message | ( | $msg | ) |
Sends a text message to all clients on all virtual servers in the TeamSpeak 3 Server instance.
string | $msg |
modify | ( | array | $properties | ) |
Changes the server instance configuration using given properties.
array | $properties |
permissionCats | ( | ) |
Returns a list of permission categories available on the server instance.
permissionEnds | ( | ) |
Returns a list of permission category endings available on the server instance.
permissionFind | ( | $permid | ) |
Returns the IDs of all clients, channels or groups using the permission with the specified ID.
integer | $permid |
permissionGetCategoryById | ( | $permid | ) |
Returns the internal category of the permission matching the given ID.
All pre-3.0.7 permission IDs are are 2 bytes wide. The first byte identifies the category while the second byte is the permission count within that group.
integer | $permid |
permissionGetGrantById | ( | $permid | ) |
Returns the internal ID of the i_needed_modify_power_* or grant permission.
Every permission has an associated i_needed_modify_power_* permission, for example b_client_ban_create has an associated permission called i_needed_modify_power_client_ban_create.
integer | $permid |
permissionGetIdByName | ( | $name | ) |
Returns the ID of the permission matching the given name.
string | $name |
TeamSpeak3_Adapter_ServerQuery_Exception |
permissionGetNameById | ( | $permid | ) |
Returns the name of the permission matching the given ID.
integer | $permid |
TeamSpeak3_Adapter_ServerQuery_Exception |
permissionList | ( | ) |
Returns a list of permissions available on the server instance.
permissionTree | ( | ) |
Returns an array filled with all permission categories known to the server including their ID, name and parent.
selfPermCheck | ( | $permid | ) |
Returns an array containing the value of a specified permission for your own client.
integer | $permid |
serverCreate | ( | array | $properties = array() | ) |
Creates a new virtual server using given properties and returns an assoc array containing the new ID and initial admin token.
array | $properties |
serverDelete | ( | $sid | ) |
Deletes the virtual server specified by ID.
integer | $sid |
serverDeselect | ( | ) |
Deselects the active virtual server.
serverGetById | ( | $sid | ) |
Returns the TeamSpeak3_Node_Server object matching the given ID.
integer | $sid |
serverGetByName | ( | $name | ) |
Returns the first TeamSpeak3_Node_Server object matching the given name.
string | $name |
TeamSpeak3_Adapter_ServerQuery_Exception |
serverGetByPort | ( | $port | ) |
Returns the TeamSpeak3_Node_Server object matching the given port number.
integer | $port |
serverGetByUid | ( | $uid | ) |
Returns the first TeamSpeak3_Node_Server object matching the given unique identifier.
string | $uid |
TeamSpeak3_Adapter_ServerQuery_Exception |
serverGetPortById | ( | $sid | ) |
Returns the port of a virtual server matching the given ID.
integer | $sid |
serverGetSelected | ( | ) |
Returns the TeamSpeak3_Node_Server object matching the currently selected ID.
serverGroupPermAutoAssign | ( | $sgtype, | |
$permid, | |||
$permvalue, | |||
$permnegated = FALSE , |
|||
$permskip = FALSE |
|||
) |
Adds a set of specified permissions to all regular server groups on all virtual servers.
The target groups will be identified by the value of their i_group_auto_update_type permission specified with $sgtype.
integer | $sgtype | |
integer | $permid | |
integer | $permvalue | |
integer | $permnegated | |
integer | $permskip |
serverGroupPermAutoRemove | ( | $sgtype, | |
$permid | |||
) |
Removes a set of specified permissions from all regular server groups on all virtual servers.
The target groups will be identified by the value of their i_group_auto_update_type permission specified with $sgtype.
integer | $sgtype | |
integer | $permid |
serverIdGetByPort | ( | $port | ) |
Returns the ID of a virtual server matching the given port.
integer | $port |
serverList | ( | array | $filter = array() | ) |
Returns an array filled with TeamSpeak3_Node_Server objects.
array | $filter |
serverListReset | ( | ) |
Resets the list of virtual servers.
serverSelect | ( | $sid, | |
$virtual = null |
|||
) |
Selects a virtual server by ID to allow further interaction.
integer | $sid | |
boolean | $virtual |
serverSelectById | ( | $sid, | |
$virtual = null |
|||
) |
Alias for serverSelect().
integer | $sid | |
boolean | $virtual |
serverSelectByPort | ( | $port, | |
$virtual = null |
|||
) |
Selects a virtual server by UDP port to allow further interaction.
integer | $port | |
boolean | $virtual |
serverSelectedId | ( | ) |
Returns the primary ID of the selected virtual server.
serverSelectedPort | ( | ) |
Returns the primary UDP port of the selected virtual server.
serverStart | ( | $sid | ) |
Starts the virtual server specified by ID.
integer | $sid |
serverStop | ( | $sid | ) |
Stops the virtual server specified by ID.
integer | $sid |
serverStopProcess | ( | ) |
Stops the entire TeamSpeak 3 Server instance by shutting down the process.
setExcludeQueryClients | ( | $exclude = FALSE | ) |
Sets the option to decide whether ServerQuery clients should be excluded from node lists or not.
boolean | $exclude |
setLoadClientlistFirst | ( | $first = FALSE | ) |
Sets the option to decide whether clients should be sorted before sub-channels to support the new TeamSpeak 3 Client display mode or not.
boolean | $first |
setPredefinedQueryName | ( | $name = null | ) |
Sets a pre-defined nickname for ServerQuery clients which will be used automatically after selecting a virtual server.
string | $name |
setUseOfflineAsVirtual | ( | $virtual = FALSE | ) |
Sets the option to decide whether offline servers will be started in virtual mode by default or not.
boolean | $virtual |
version | ( | $ident = null | ) |
Returns the servers version information including platform and build number.
string | $ident |
whoami | ( | ) |
Returns information about your current ServerQuery connection.
whoamiGet | ( | $ident, | |
$default = null |
|||
) |
Returns a single value from the current ServerQuery connection info.
string | $ident | |
mixed | $default |
whoamiReset | ( | ) |
Resets the current ServerQuery connection info.
whoamiSet | ( | $ident, | |
$value = null |
|||
) |
Sets a single value in the current ServerQuery connection info.
string | $ident | |
mixed | $value |