ts3phpframework
Loading...
Searching...
No Matches
PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html Class Reference

Renders nodes used in HTML-based TeamSpeak 3 viewers. More...

Inheritance diagram for PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html:
PlanetTeamSpeak\TeamSpeak3Framework\Viewer\ViewerInterface

Public Member Functions

 __construct (string $iconpath="images/viewer/", string $flagpath=null, string $ftclient=null, string $pattern=null)
 fetchObject (Node $node, array $siblings=[])

Protected Member Functions

 getContainerIdent ()
 getContainerClass ()
 getContainerSummary ()
 getRowClass ()
 getPrefixClass ()
 getPrefix ()
 getCorpusClass ()
 getCorpusTitle ()
 getCorpusIcon ()
 getCorpusName ()
 getSuffixClass ()
 getSuffixIcon ()
 getSuffixIconServer ()
 getSuffixIconChannel ()
 getSuffixIconClient ()
 getSuffixFlag ()
 getImage (string $name, string $text="", string $class=null, bool $iconpath=true, bool $flagpath=false)

Protected Attributes

string $pattern = "<table id='%0' class='%1' summary='%2'><tr class='%3'><td class='%4'>%5</td><td class='%6' title='%7'>%8 %9</td><td class='%10'>%11%12</td></tr></table>\n"
Node $currObj = null
array $currSib = null
int $currNum = 0
string $iconpath
string $flagpath
string $ftclient
array $cachedIcons = [100, 200, 300, 400, 500, 600]
array $remoteIcons = []

Detailed Description

Renders nodes used in HTML-based TeamSpeak 3 viewers.

Definition at line 24 of file Html.php.

Constructor & Destructor Documentation

◆ __construct()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::__construct ( string $iconpath = "images/viewer/",
string $flagpath = null,
string $ftclient = null,
string $pattern = null )

Html constructor.

Parameters
string$iconpath
string | null$flagpath
string | null$ftclient
string | null$pattern
Returns
void

Definition at line 99 of file Html.php.

Member Function Documentation

◆ fetchObject()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::fetchObject ( Node $node,
array $siblings = [] )

Returns the code needed to display a node in a TeamSpeak 3 viewer.

Parameters
Node$node
array$siblings
Returns
string
Exceptions
AdapterException
HelperException
ServerQueryException

Implements PlanetTeamSpeak\TeamSpeak3Framework\Viewer\ViewerInterface.

Definition at line 120 of file Html.php.

◆ getContainerClass()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getContainerClass ( )
protected

Returns a dynamic string for the current container element which can be used as an HTML class property.

Returns
string

Definition at line 161 of file Html.php.

◆ getContainerIdent()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getContainerIdent ( )
protected

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

Returns
string

Definition at line 150 of file Html.php.

◆ getContainerSummary()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getContainerSummary ( )
protected

Returns the ID of the current node which will be used as a summary element for the container element.

Returns
integer

Definition at line 172 of file Html.php.

◆ getCorpusClass()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getCorpusClass ( )
protected

Returns a string for the current corpus element which can be used as an HTML class property. If the current node is a channel spacer the class string will contain additional class names to allow further customization of the content via CSS.

Returns
string

Definition at line 228 of file Html.php.

◆ getCorpusIcon()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getCorpusIcon ( )
protected

Returns an HTML img tag which can be used to display the status icon for a TeamSpeak_Node_Abstract object.

Returns
string

Definition at line 301 of file Html.php.

◆ getCorpusName()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getCorpusName ( )
protected

Returns a string for the current corpus element which contains the display name for the current TeamSpeak_Node_Abstract object.

Returns
string

Definition at line 316 of file Html.php.

◆ getCorpusTitle()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getCorpusTitle ( )
protected

Returns the HTML img tags which can be used to display the various icons for a TeamSpeak_Node_Abstract object.

Returns
string|null

Definition at line 281 of file Html.php.

◆ getImage()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getImage ( string $name,
string $text = "",
string $class = null,
bool $iconpath = true,
bool $flagpath = false )
protected

Returns the code to display a custom HTML img tag.

Parameters
string$name
string$text
string | null$class
boolean$iconpath
boolean$flagpath
Returns
string

Definition at line 602 of file Html.php.

◆ getPrefix()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getPrefix ( )
protected

Returns the HTML img tags to display the prefix of the current node.

Returns
string

Definition at line 204 of file Html.php.

◆ getPrefixClass()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getPrefixClass ( )
protected

Returns a string for the current prefix element which can be used as an HTML class property.

Returns
string

Definition at line 194 of file Html.php.

◆ getRowClass()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getRowClass ( )
protected

Returns a dynamic string for the current row element which can be used as an HTML class property.

Returns
string

Definition at line 183 of file Html.php.

◆ getSuffixClass()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixClass ( )
protected

Returns a string for the current suffix element which can be used as an HTML class property.

Returns
string

Definition at line 361 of file Html.php.

◆ getSuffixFlag()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixFlag ( )
protected

Returns an HTML img tag which can be used to display the country flag for a TeamSpeak_Node_Client object.

Returns
string

Definition at line 579 of file Html.php.

◆ getSuffixIcon()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixIcon ( )
protected

Returns the HTML img tags which can be used to display the various icons for a TeamSpeak_Node_Abstract object.

Returns
string
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 375 of file Html.php.

◆ getSuffixIconChannel()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixIconChannel ( )
protected

Returns the HTML img tags which can be used to display the various icons for a TeamSpeak_Node_Channel object.

Returns
string
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 436 of file Html.php.

◆ getSuffixIconClient()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixIconClient ( )
protected

Returns the HTML img tags which can be used to display the various icons for a TeamSpeak_Node_Client object.

Returns
string
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 496 of file Html.php.

◆ getSuffixIconServer()

PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::getSuffixIconServer ( )
protected

Returns the HTML img tags which can be used to display the various icons for a TeamSpeak_Node_Server object.

Returns
string
Exceptions
AdapterException
HelperException
ServerQueryException

Definition at line 396 of file Html.php.

Member Data Documentation

◆ $cachedIcons

array PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$cachedIcons = [100, 200, 300, 400, 500, 600]
protected

Definition at line 81 of file Html.php.

◆ $currNum

int PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$currNum = 0
protected

Definition at line 53 of file Html.php.

◆ $currObj

Node PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$currObj = null
protected

Definition at line 38 of file Html.php.

◆ $currSib

array PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$currSib = null
protected

Definition at line 46 of file Html.php.

◆ $flagpath

string PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$flagpath
protected

Definition at line 67 of file Html.php.

◆ $ftclient

string PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$ftclient
protected

Definition at line 74 of file Html.php.

◆ $iconpath

string PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$iconpath
protected

Definition at line 60 of file Html.php.

◆ $pattern

string PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$pattern = "<table id='%0' class='%1' summary='%2'><tr class='%3'><td class='%4'>%5</td><td class='%6' title='%7'>%8 %9</td><td class='%10'>%11%12</td></tr></table>\n"
protected

Definition at line 31 of file Html.php.

◆ $remoteIcons

array PlanetTeamSpeak\TeamSpeak3Framework\Viewer\Html::$remoteIcons = []
protected

Definition at line 88 of file Html.php.


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