ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Node\Client Class Reference

Class describing a TeamSpeak 3 client and all it's parameters. More...

Inheritance diagram for PlanetTeamSpeak\TeamSpeak3Framework\Node\Client:
PlanetTeamSpeak\TeamSpeak3Framework\Node\Node

Public Member Functions

 __construct (Server $server, array $info, string $index="clid")
 modify (array $properties)
 modifyDb (array $properties)
 deleteDb ()
 infoDb ()
 message (string $msg)
 move (int $cid, string $cpw=null)
 kick (int $reasonid=TeamSpeak3::KICK_CHANNEL, string $reasonmsg=null)
 poke (string $msg)
 ban (int $timeseconds=null, string $reason=null)
 customInfo ()
 customSet (string $ident, string $value)
 customDelete (string $ident)
 permOverview (int $cid)
 permList (bool $permsid=false)
 permAssign (int|array $permid, int|array $permvalue, array|bool $permskip=false)
 permAssignByName ($permname, $permvalue, $permskip=false)
 permRemove (int $permid)
 permRemoveByName ($permname)
 setChannelGroup (int $cid, int $cgid)
 addServerGroup (int $sgid)
 remServerGroup (int $sgid)
 avatarGetName ()
 avatarDownload ()
 getClones ()
 hasOverwolf ()
 getBadges ()
 getRev ()
 memberOf ()
 iconDownload ()
 sendPluginCmd (string $plugin, string $data)
 getUniqueId ()
 getIcon ()
 getSymbol ()
 __toString ()
Public Member Functions inherited from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node
 request (string $cmd, bool $throw=true)
 prepare (string $cmd, array $params=[])
 execute ($cmd, array $params=[])
 getParent ()
 getId ()
 iconIsLocal (string $key)
 iconGetName (string $key)
 getClass (string $prefix="ts3_")
 getViewer (ViewerInterface $viewer)
 getInfo (bool $extend=true, bool $convert=false)
 getProperty (string $property, mixed $default=null)
 toString ()
 toArray ()
 __call (string $name, array $args)
 __sleep ()
 count ()
 current ()
 getChildren ()
 hasChildren ()
 hasNext ()
 key ()
 valid ()
 next ()
 rewind ()
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 __get ($offset)
 __set ($offset, $value)

Protected Member Functions

 fetchNodeInfo ()
Protected Member Functions inherited from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node
 filterList (array $nodes=[], array $rules=[])
 setStorage (string $key, mixed $val)
 getStorage (string $key, mixed $default=null)
 delStorage (string $key)
 fetchNodeList ()
 resetNodeInfo ()
 verifyNodeList ()
 resetNodeList ()

Additional Inherited Members

Protected Attributes inherited from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node
Node null ServerQuery $parent = null
array null $server = null
int $nodeId = 0x00
array null $nodeList = null
array $nodeInfo = []
array $storage = []

Detailed Description

Class describing a TeamSpeak 3 client and all it's parameters.

Definition at line 17 of file Client.php.

Constructor & Destructor Documentation

◆ __construct()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::__construct ( Server $server,
array $info,
string $index = "clid" )

Client constructor.

Parameters
Server$server
array$info
string$index
Exceptions
ServerQueryException

Definition at line 27 of file Client.php.

Member Function Documentation

◆ __toString()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::__toString ( )

Returns a string representation of this node.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 485 of file Client.php.

◆ addServerGroup()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::addServerGroup ( int $sgid)

Adds the client to the server group specified with $sgid.

Parameters
integer$sgid
Returns
void

Definition at line 267 of file Client.php.

◆ avatarDownload()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::avatarDownload ( )

Downloads and returns the clients avatar file content.

Returns
StringHelper|void
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 301 of file Client.php.

◆ avatarGetName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::avatarGetName ( )

Returns the possible name of the client's avatar.

Returns
StringHelper

Definition at line 288 of file Client.php.

◆ ban()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::ban ( int $timeseconds = null,
string $reason = null )

Bans the client from the server. Please note that this will create two separate ban rules for the targeted clients IP address and his unique identifier.

Parameters
integer | null$timeseconds
string | null$reason
Returns
array

Definition at line 142 of file Client.php.

◆ customDelete()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::customDelete ( string $ident)

Removes a custom property from the client.

Parameters
string$ident
Returns
void

Definition at line 175 of file Client.php.

◆ customInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::customInfo ( )

Returns a list of custom properties for the client.

Returns
array

Definition at line 152 of file Client.php.

◆ customSet()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::customSet ( string $ident,
string $value )

Creates or updates a custom property for the client.

Parameters
string$ident
string$value
Returns
void

Definition at line 164 of file Client.php.

◆ deleteDb()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::deleteDb ( )

Deletes the clients properties from the database.

Returns
void

Definition at line 71 of file Client.php.

◆ fetchNodeInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::fetchNodeInfo ( )
protected
Exceptions
AdapterException@ignore

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 425 of file Client.php.

◆ getBadges()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getBadges ( )

Returns a list of equipped badges for this client.

Returns
array

Definition at line 340 of file Client.php.

◆ getClones()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getClones ( )

Returns a list of client connections using the same identity as this client.

Returns
array
Exceptions
AdapterException
ServerQueryException

Definition at line 320 of file Client.php.

◆ getIcon()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getIcon ( )

Returns the name of a possible icon to display the node object.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 449 of file Client.php.

◆ getRev()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getRev ( )

Returns the revision/build number from the clients version string.

Returns
int|null

Definition at line 358 of file Client.php.

◆ getSymbol()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getSymbol ( )

Returns a symbol representing the node.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 475 of file Client.php.

◆ getUniqueId()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::getUniqueId ( )

Returns a unique identifier for the node which can be used as an HTML property.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 439 of file Client.php.

◆ hasOverwolf()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::hasOverwolf ( )

Returns TRUE if the client is using Overwolf.

Returns
boolean

Definition at line 330 of file Client.php.

◆ iconDownload()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::iconDownload ( )

Downloads and returns the clients icon file content.

Returns
StringHelper|void
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 390 of file Client.php.

◆ infoDb()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::infoDb ( )

Returns a list of properties from the database for the client.

Returns
array

Definition at line 81 of file Client.php.

◆ kick()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::kick ( int $reasonid = TeamSpeak3::KICK_CHANNEL,
string $reasonmsg = null )

Kicks the client from his currently joined channel or from the server.

Parameters
integer$reasonid
string | null$reasonmsg
Returns
void

Definition at line 118 of file Client.php.

◆ memberOf()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::memberOf ( )

Returns all server and channel groups the client is currently residing in.

Returns
array

Definition at line 368 of file Client.php.

◆ message()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::message ( string $msg)

Sends a text message to the client.

Parameters
string$msg
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 94 of file Client.php.

◆ modify()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::modify ( array $properties)

Changes the clients properties using given properties.

Parameters
array$properties
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 47 of file Client.php.

◆ modifyDb()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::modifyDb ( array $properties)

Changes the clients properties using given properties.

Parameters
array$properties
Returns
void

Definition at line 61 of file Client.php.

◆ move()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::move ( int $cid,
string $cpw = null )

Moves the client to another channel.

Parameters
integer$cid
string | null$cpw
Returns
void

Definition at line 106 of file Client.php.

◆ permAssign()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permAssign ( int|array $permid,
int|array $permvalue,
array|bool $permskip = false )

Adds a set of specified permissions to the client. Multiple permissions can be added by providing the three parameters of each permission.

Parameters
integer | integer[]$permid
integer | integer[]$permvalue
bool | bool[]$permskip
Returns
void

Definition at line 213 of file Client.php.

◆ permAssignByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permAssignByName ( $permname,
$permvalue,
$permskip = false )

Alias for permAssign().

Deprecated

Definition at line 223 of file Client.php.

◆ permList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permList ( bool $permsid = false)

Returns a list of permissions defined for the client.

Parameters
boolean$permsid
Returns
array

Definition at line 199 of file Client.php.

◆ permOverview()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permOverview ( int $cid)

Returns an array containing the permission overview of the client.

Parameters
integer$cid
Returns
array
Exceptions
AdapterException
ServerQueryException

Definition at line 188 of file Client.php.

◆ permRemove()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permRemove ( int $permid)

Removes a set of specified permissions from a client. Multiple permissions can be removed at once.

Parameters
integer$permid
Returns
void

Definition at line 234 of file Client.php.

◆ permRemoveByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::permRemoveByName ( $permname)

Alias for permRemove().

Deprecated

Definition at line 244 of file Client.php.

◆ poke()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::poke ( string $msg)

Sends a poke message to the client.

Parameters
string$msg
Returns
void

Definition at line 129 of file Client.php.

◆ remServerGroup()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::remServerGroup ( int $sgid)

Removes the client from the server group specified with $sgid.

Parameters
integer$sgid
Returns
void

Definition at line 278 of file Client.php.

◆ sendPluginCmd()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::sendPluginCmd ( string $plugin,
string $data )

Sends a plugin command to the client.

Parameters
string$plugin
string$data
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 416 of file Client.php.

◆ setChannelGroup()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Client::setChannelGroup ( int $cid,
int $cgid )

Sets the channel group of a client to the ID specified.

Parameters
integer$cid
integer$cgid
Returns
void

Definition at line 256 of file Client.php.


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