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

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

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

Public Member Functions

 __construct (Server $server, array $info, string $index="cid")
 subChannelList (array $filter=[])
 subChannelGetById (int $cid)
 subChannelGetByName (int $name)
 clientList (array $filter=[])
 clientGetById (int $clid)
 clientGetByName (int $name)
 clientPermList (int $cldbid, bool $permsid=false)
 clientPermAssign (int $cldbid, int|array $permid, int|array $permvalue)
 clientPermAssignByName ($cldbid, $permname, $permvalue)
 clientPermRemove (int $cldbid, int|array $permid)
 clientPermRemoveByName ($cldbid, $permname)
 permList (bool $permsid=false)
 permAssign (int|array $permid, int|array $permvalue)
 permAssignByName ($permname, $permvalue)
 permRemove (int|array $permid)
 permRemoveByName ($permname)
 fileList (string $cpw="", string $path="/", bool $recursive=false)
 fileInfo (string $cpw="", string $name="/")
 fileRename (string $cpw="", string $oldname="/", string $newname="/", int $tcid=null, string $tcpw=null)
 fileDelete (string $cpw="", string $name="/")
 dirCreate (string $cpw="", string $dirname="/")
 getLevel ()
 getPathway ()
 spacerGetType ()
 spacerGetAlign ()
 isSpacer ()
 iconDownload ()
 modify (array $properties)
 message (string $msg, string $cpw=null)
 delete (bool $force=false)
 move (int $pid, int $order=null)
 sendPluginCmd (string $plugin, string $data, string $cpw=null, bool $subscribed=false)
 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

 fetchNodeList ()
 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)
 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 channel and all it's parameters.

Definition at line 17 of file Channel.php.

Constructor & Destructor Documentation

◆ __construct()

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

Channel constructor.

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

Definition at line 30 of file Channel.php.

Member Function Documentation

◆ __toString()

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

Returns a string representation of this node.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 563 of file Channel.php.

◆ clientGetById()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientGetById ( int $clid)

Returns the PlanetTeamSpeak\TeamSpeak3Framework\Node\Client object matching the given ID.

Parameters
integer$clid
Returns
Client
Exceptions
ServerQueryException

Definition at line 121 of file Channel.php.

◆ clientGetByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientGetByName ( int $name)

Returns the PlanetTeamSpeak\TeamSpeak3Framework\Node\Client object matching the given name.

Parameters
integer$name
Returns
Client
Exceptions
ServerQueryException

Definition at line 137 of file Channel.php.

◆ clientList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientList ( array $filter = [])

Returns an array filled with PlanetTeamSpeak\TeamSpeak3Framework\Node\Client objects.

Parameters
array$filter
Returns
array | Client[]

Definition at line 101 of file Channel.php.

◆ clientPermAssign()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientPermAssign ( int $cldbid,
int|array $permid,
int|array $permvalue )

Adds a set of specified permissions to a client in a specific channel. Multiple permissions can be added by providing the two parameters of each permission.

Parameters
integer$cldbid
integer | integer[]$permid
integer | integer[]$permvalue
Returns
void

Definition at line 169 of file Channel.php.

◆ clientPermAssignByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientPermAssignByName ( $cldbid,
$permname,
$permvalue )

Alias for clientPermAssign().

Deprecated

Definition at line 179 of file Channel.php.

◆ clientPermList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientPermList ( int $cldbid,
bool $permsid = false )

Returns a list of permissions defined for a client in the channel.

Parameters
integer$cldbid
boolean$permsid
Returns
array

Definition at line 155 of file Channel.php.

◆ clientPermRemove()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientPermRemove ( int $cldbid,
int|array $permid )

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

Parameters
integer$cldbid
integer | integer[]$permid
Returns
void

Definition at line 191 of file Channel.php.

◆ clientPermRemoveByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::clientPermRemoveByName ( $cldbid,
$permname )

Alias for clientPermRemove().

Deprecated

Definition at line 201 of file Channel.php.

◆ delete()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::delete ( bool $force = false)

Deletes the channel.

Parameters
boolean$force
Returns
void

Definition at line 441 of file Channel.php.

◆ dirCreate()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::dirCreate ( string $cpw = "",
string $dirname = "/" )

Creates new directory in a channels file repository.

Parameters
string$cpw
string$dirname
Returns
void

Definition at line 321 of file Channel.php.

◆ fetchNodeInfo()

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

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 517 of file Channel.php.

◆ fetchNodeList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::fetchNodeList ( )
protected

@ignore

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 481 of file Channel.php.

◆ fileDelete()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::fileDelete ( string $cpw = "",
string $name = "/" )

Deletes one or more files stored in the channels file repository.

Parameters
string$cpw
string$name
Returns
void

Definition at line 309 of file Channel.php.

◆ fileInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::fileInfo ( string $cpw = "",
string $name = "/" )

Returns detailed information about the specified file stored in the channels file repository.

Parameters
string$cpw
string$name
Returns
array

Definition at line 281 of file Channel.php.

◆ fileList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::fileList ( string $cpw = "",
string $path = "/",
bool $recursive = false )

Returns a list of files and directories stored in the channels file repository.

Parameters
string$cpw
string$path
boolean$recursive
Returns
array

Definition at line 269 of file Channel.php.

◆ fileRename()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::fileRename ( string $cpw = "",
string $oldname = "/",
string $newname = "/",
int $tcid = null,
string $tcpw = null )

Renames a file in the channels file repository. If the two parameters $tcid and $tcpw are specified, the file will be moved into another channels file repository.

Parameters
string$cpw
string$oldname
string$newname
integer | null$tcid
string | null$tcpw
Returns
void

Definition at line 297 of file Channel.php.

◆ getIcon()

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

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

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 537 of file Channel.php.

◆ getLevel()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::getLevel ( )

Returns the level of the channel.

Returns
integer

Definition at line 331 of file Channel.php.

◆ getPathway()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::getPathway ( )

Returns the pathway of the channel which can be used as a clients default channel.

Returns
string

Definition at line 341 of file Channel.php.

◆ getSymbol()

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

Returns a symbol representing the node.

Returns
string

Reimplemented from PlanetTeamSpeak\TeamSpeak3Framework\Node\Node.

Definition at line 553 of file Channel.php.

◆ getUniqueId()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::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 527 of file Channel.php.

◆ iconDownload()

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

Downloads and returns the channels icon file content.

Returns
StringHelper|void
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 384 of file Channel.php.

◆ isSpacer()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::isSpacer ( )

Returns TRUE if the channel is a spacer.

Returns
boolean

Definition at line 371 of file Channel.php.

◆ message()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::message ( string $msg,
string $cpw = null )

Sends a text message to all clients in the channel.

Parameters
string$msg
string | null$cpw
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 426 of file Channel.php.

◆ modify()

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

Changes the channel configuration using given properties.

Parameters
array$properties
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 409 of file Channel.php.

◆ move()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::move ( int $pid,
int $order = null )

Moves the channel to the parent channel specified with $pid.

Parameters
integer$pid
integer | null$order
Returns
void

Definition at line 453 of file Channel.php.

◆ permAssign()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::permAssign ( int|array $permid,
int|array $permvalue )

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

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

Definition at line 225 of file Channel.php.

◆ permAssignByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::permAssignByName ( $permname,
$permvalue )

Alias for permAssign().

Deprecated

Definition at line 235 of file Channel.php.

◆ permList()

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

Returns a list of permissions defined for the channel.

Parameters
boolean$permsid
Returns
array

Definition at line 212 of file Channel.php.

◆ permRemove()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::permRemove ( int|array $permid)

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

Parameters
integer | integer[]$permid
Returns
void

Definition at line 246 of file Channel.php.

◆ permRemoveByName()

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

Alias for permRemove().

Deprecated

Definition at line 256 of file Channel.php.

◆ sendPluginCmd()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::sendPluginCmd ( string $plugin,
string $data,
string $cpw = null,
bool $subscribed = false )

Sends a plugin command to all clients in the channel.

Parameters
string$plugin
string$data
string | null$cpw
boolean$subscribed
Returns
void
Exceptions
AdapterException
ServerQueryException

Definition at line 469 of file Channel.php.

◆ spacerGetAlign()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::spacerGetAlign ( )

Returns the possible spacer alignment of the channel.

Returns
integer

Definition at line 361 of file Channel.php.

◆ spacerGetType()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::spacerGetType ( )

Returns the possible spacer type of the channel.

Returns
integer

Definition at line 351 of file Channel.php.

◆ subChannelGetById()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::subChannelGetById ( int $cid)

Returns the PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel object matching the given ID.

Parameters
integer$cid
Returns
Channel
Exceptions
ServerQueryException

Definition at line 68 of file Channel.php.

◆ subChannelGetByName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::subChannelGetByName ( int $name)

Returns the PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel object matching the given name.

Parameters
integer$name
Returns
Channel
Exceptions
ServerQueryException

Definition at line 84 of file Channel.php.

◆ subChannelList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel::subChannelList ( array $filter = [])

Returns an array filled with PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel objects.

Parameters
array$filter
Returns
array|Channel[]

Definition at line 48 of file Channel.php.


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