ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Node\Node Class Reference
Inheritance diagram for PlanetTeamSpeak\TeamSpeak3Framework\Node\Node:
PlanetTeamSpeak\TeamSpeak3Framework\Node\Channel PlanetTeamSpeak\TeamSpeak3Framework\Node\Client PlanetTeamSpeak\TeamSpeak3Framework\Node\Group PlanetTeamSpeak\TeamSpeak3Framework\Node\Host PlanetTeamSpeak\TeamSpeak3Framework\Node\Server PlanetTeamSpeak\TeamSpeak3Framework\Node\ChannelGroup PlanetTeamSpeak\TeamSpeak3Framework\Node\ServerGroup

Public Member Functions

 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_")
 getUniqueId ()
 getIcon ()
 getSymbol ()
 getViewer (ViewerInterface $viewer)
 getInfo (bool $extend=true, bool $convert=false)
 getProperty (string $property, mixed $default=null)
 __toString ()
 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

 filterList (array $nodes=[], array $rules=[])
 setStorage (string $key, mixed $val)
 getStorage (string $key, mixed $default=null)
 delStorage (string $key)
 fetchNodeList ()
 fetchNodeInfo ()
 resetNodeInfo ()
 verifyNodeList ()
 resetNodeList ()

Protected Attributes

Node null ServerQuery $parent = null
array null $server = null
int $nodeId = 0x00
array null $nodeList = null
array $nodeInfo = []
array $storage = []

Detailed Description

Definition at line 24 of file Node.php.

Member Function Documentation

◆ __call()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::__call ( string $name,
array $args )

Called whenever we're using an unknown method.

Parameters
string$name
array$args
Returns
mixed
Exceptions
NodeException

Definition at line 354 of file Node.php.

◆ __get()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::__get ( $offset)
Exceptions
NodeException@ignore

Definition at line 590 of file Node.php.

◆ __set()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::__set ( $offset,
$value )
Exceptions
NodeException@ignore

Definition at line 599 of file Node.php.

◆ __sleep()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::__sleep ( )

Commit pending data.

Returns
array

Definition at line 403 of file Node.php.

◆ __toString()

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

◆ count()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::count ( )

@ignore

Definition at line 452 of file Node.php.

◆ current()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::current ( )

@ignore

Definition at line 462 of file Node.php.

◆ delStorage()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::delStorage ( string $key)
protected

Deletes data from the internal storage array.

Parameters
string$key
Returns
void

Definition at line 393 of file Node.php.

◆ execute()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::execute ( $cmd,
array $params = [] )

Prepares and executes a ServerQuery command and returns the result.

Parameters
$cmd
array$params
Returns
Reply
Exceptions
AdapterException
ServerQueryException

Definition at line 90 of file Node.php.

◆ fetchNodeInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::fetchNodeInfo ( )
protected

◆ fetchNodeList()

◆ filterList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::filterList ( array $nodes = [],
array $rules = [] )
protected

Filters given node list array using specified filter rules.

Parameters
array$nodes
array$rules
Returns
array

Definition at line 225 of file Node.php.

◆ getChildren()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getChildren ( )

@ignore

Definition at line 472 of file Node.php.

◆ getClass()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getClass ( string $prefix = "ts3_")

Returns a possible classname for the node which can be used as an HTML property.

Parameters
string$prefix
Returns
string

Definition at line 155 of file Node.php.

◆ getIcon()

◆ getId()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getId ( )

Returns the primary ID of the current node.

Returns
integer

Definition at line 110 of file Node.php.

◆ getInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getInfo ( bool $extend = true,
bool $convert = false )

Returns all information available on this node. If $convert is enabled, some property values will be converted to human-readable values.

Parameters
boolean$extend
boolean$convert
Returns
array

Definition at line 261 of file Node.php.

◆ getParent()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getParent ( )

Returns the parent object of the current node.

Returns
ServerQuery|Node|null

Definition at line 100 of file Node.php.

◆ getProperty()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getProperty ( string $property,
mixed $default = null )

Returns the specified property or a pre-defined default value from the node info array.

Parameters
string$property
mixed | null$default
Returns
mixed

Definition at line 303 of file Node.php.

◆ getStorage()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getStorage ( string $key,
mixed $default = null )
protected

Returns data from the internal storage array.

Parameters
string$key
mixed | null$default
Returns
mixed

Definition at line 382 of file Node.php.

◆ getSymbol()

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

◆ getUniqueId()

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

◆ getViewer()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::getViewer ( ViewerInterface $viewer)

Returns the HTML code to display a TeamSpeak 3 viewer.

Parameters
ViewerInterface$viewer
Returns
string

Definition at line 193 of file Node.php.

◆ hasChildren()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::hasChildren ( )

@ignore

Definition at line 482 of file Node.php.

◆ hasNext()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::hasNext ( )

@ignore

Definition at line 492 of file Node.php.

◆ iconGetName()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::iconGetName ( string $key)

Returns the internal path of the node icon.

Parameters
string$key
Returns
StringHelper

Definition at line 137 of file Node.php.

◆ iconIsLocal()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::iconIsLocal ( string $key)

Returns TRUE if the node icon has a local source.

Parameters
string$key
Returns
boolean

Definition at line 121 of file Node.php.

◆ key()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::key ( )

@ignore

Definition at line 502 of file Node.php.

◆ next()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::next ( )

@ignore

Definition at line 522 of file Node.php.

◆ offsetExists()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::offsetExists ( $offset)

@ignore

Definition at line 542 of file Node.php.

◆ offsetGet()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::offsetGet ( $offset)
Exceptions
NodeException@ignore

Definition at line 551 of file Node.php.

◆ offsetSet()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::offsetSet ( $offset,
$value )
Exceptions
NodeException@ignore

Definition at line 568 of file Node.php.

◆ offsetUnset()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::offsetUnset ( $offset)

@ignore

Definition at line 581 of file Node.php.

◆ prepare()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::prepare ( string $cmd,
array $params = [] )

Uses given parameters and returns a prepared ServerQuery command.

Parameters
string$cmd
array$params
Returns
StringHelper

Definition at line 76 of file Node.php.

◆ request()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::request ( string $cmd,
bool $throw = true )

Sends a prepared command to the server and returns the result.

Parameters
string$cmd
boolean$throw
Returns
Reply
Exceptions
AdapterException|ServerQueryException

Reimplemented in PlanetTeamSpeak\TeamSpeak3Framework\Node\Server.

Definition at line 64 of file Node.php.

◆ resetNodeInfo()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::resetNodeInfo ( )
protected

@ignore

Definition at line 426 of file Node.php.

◆ resetNodeList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::resetNodeList ( )
protected

@ignore

Definition at line 444 of file Node.php.

◆ rewind()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::rewind ( )

@ignore

Definition at line 532 of file Node.php.

◆ setStorage()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::setStorage ( string $key,
mixed $val )
protected

Writes data to the internal storage array.

Parameters
string$key
mixed$val
Returns
void

Definition at line 370 of file Node.php.

◆ toArray()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::toArray ( )

Returns an assoc array filled with current node info properties.

Returns
array

Definition at line 341 of file Node.php.

◆ toString()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::toString ( )

Returns a string representation of this node.

Returns
string

Definition at line 331 of file Node.php.

◆ valid()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::valid ( )

@ignore

Definition at line 512 of file Node.php.

◆ verifyNodeList()

PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::verifyNodeList ( )
protected

@ignore

Definition at line 434 of file Node.php.

Member Data Documentation

◆ $nodeId

int PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$nodeId = 0x00
protected

@ignore

Definition at line 39 of file Node.php.

◆ $nodeInfo

array PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$nodeInfo = []
protected

@ignore

Definition at line 49 of file Node.php.

◆ $nodeList

array null PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$nodeList = null
protected

@ignore

Definition at line 44 of file Node.php.

◆ $parent

Node null ServerQuery PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$parent = null
protected

Definition at line 29 of file Node.php.

◆ $server

array null PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$server = null
protected

@ignore

Definition at line 34 of file Node.php.

◆ $storage

array PlanetTeamSpeak\TeamSpeak3Framework\Node\Node::$storage = []
protected

@ignore

Definition at line 54 of file Node.php.


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