Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: ./ts2_tabledump.inc
TeamSpeak2 TCP Server Interface Classes - php-ts2

ts2_tabledump

ts2_tcpserver
   |
  +-- ts2_tabledump

PHP TeamSpeak2 TCPServer Interface Table Output

 

public class ts2_tabledump extends ts2_tcpserver

PHP TeamSpeak2 TCPServer Interface Table Output
This is a demo class using the TCP server interface class for TeamSpeak servers pretty prints the channels and users of a server.There are comming some images along which are needed in the right place to have a nice layout.

AuthorsThomas Liske <thomas@fiasko.dyndns.org>
Version0.0.5

 
Direct known subclasses: ts2_tablewdump

Methods inherited from ts2_tcpserver

cmp_channels, close, general_informations, server_list, server_informations, player_list, channel_list, channel_flags_short, channel_flags_long, player_flags_short, player_flags_long, player_pprivs_short, player_pprivs_long, player_cprivs_short, player_cprivs_long

Public Method Summary

void

ts2_tabledump([ integer $table_width, string $img_dir, integer $img_width, integer $img_height ])

Creates a new ts2_tabledump object.
bool

connect(string $host, [ integer $tcpport, integer $timeout ])

Initializes a connection to a TeamSpeak server.Warning: documentation is missing.
void

dump_table_all([ string $root_title ])

Dumps all virtual servers, channels and users into a table.
void

dump_table_all_parts([ string $root_title ])

Dumps all virtual servers, channels and users into a table.
void

dump_table_server(integer $port)

Dumps channel and users of a virtual server into a table.
void

dump_channel_link(integer $server, string $channel)

Creates a link to a channel on a server (teamspeak protocol).
void

dump_server_link(integer $server)

Creates a link to a server (teamspeak protocol).
void

dump_table_server_parts(integer $server, string $ident)

Dumps channel and users of a virtual server into parts for a table.

Private Method Summary

void

_dump_ident(string $ident)

Dumps ident cells for a row.
void

_dump_table_channel_parts(array $channel, array $pl, string $ident, integer $port)

Dumps a channel and its subchannels + users.

Fields inherited from ts2_tcpserver

$tcp_conn, $last_errno, $last_errstr, $cprivs, $pprivs, $pflags, $cflags, $player_cols, $channel_cols

Private Field Summary

string

$img_dir

The relative image directory to be used.
integer

$img_width

The images width (must be same for all images).
integer

$img_height

The images height (must be same for all images).
integer

$table_width

The table width (depends on the length of the channel names).
array

$idents

Filenames used by the _dump_ident() function.
string

$host

The host we are connected to - needed to create teamspeak client URLs in _dump_table_channel_parts().

Included files Summary, Type: require_once

ts2_tcpserver.inc Warning: documentation is missing.

Public Method Details

ts2_tabledump

public void ts2_tabledump( [ integer $table_width, string $img_dir, integer $img_width, integer $img_height ] )

  Creates a new ts2_tabledump object.

Parameter
integer $table_width = >>350<<
The table width (depends on the length of the channel names).
string $img_dir = >>'images'<<
The relative image directory to be used.
integer $img_width = >>16<<
The images width (must be same for all images).
integer $img_height = >>16<<
The images height (must be same for all images).
Returns void


connect

public bool connect( string $host, [ integer $tcpport, integer $timeout ] )

  Initializes a connection to a TeamSpeak server.

Warning: documentation is missing.

Parameter
string $host
The hostname or IP where the TeamSpeak server is running.
integer $tcpport = >>51234<<
The TCP port for the TCP interface.
integer $timeout = >>5<<
The connection timeout in seconds.
Returns bool

Returns TRUE if the connection was established else FALSE is returned.

See Also $last_errno, $last_errstr, close()

dump_table_all

public void dump_table_all( [ string $root_title ] )

  Dumps all virtual servers, channels and users into a table.

Parameter
string $root_title = >>''<<
Server to query.
Returns void


dump_table_all_parts

public void dump_table_all_parts( [ string $root_title ] )

  Dumps all virtual servers, channels and users into a table.

Parameter
string $root_title = >>''<<
Server to query.
Returns void


dump_table_server

public void dump_table_server( integer $port )

  Dumps channel and users of a virtual server into a table.

Parameter
integer $port
Server to query.
Returns void


dump_channel_link

public void dump_channel_link( integer $server, string $channel )

  Creates a link to a channel on a server (teamspeak protocol).

Parameter
integer $server
Virtual server to address.
string $channel
Channel name.
Returns void


dump_server_link

public void dump_server_link( integer $server )

  Creates a link to a server (teamspeak protocol).

Parameter
integer $server
Virtual server to address.
Returns void


dump_table_server_parts

public void dump_table_server_parts( integer $server, string $ident )

  Dumps channel and users of a virtual server into parts for a table.

Parameter
integer $server
Virtual server to query.
string $ident
The ident string.
Returns void


Private Method Details

_dump_ident

private void _dump_ident( string $ident )

  Dumps ident cells for a row.

Parameter
string $ident
The ident string.
Returns void


_dump_table_channel_parts

private void _dump_table_channel_parts( array $channel, array $pl, string $ident, integer $port )

  Dumps a channel and its subchannels + users.

Parameter
array $channel
The channel information, an item from the channel_list() return array.
array $pl
The player list for the hole server.
string $ident
The ident string.
integer $port
The server the channel is on.
Returns void


Private Field Details

$img_dir

private string $img_dir

>><<

The relative image directory to be used.


$img_width

private integer $img_width

>><<

The images width (must be same for all images).


$img_height

private integer $img_height

>><<

The images height (must be same for all images).


$table_width

private integer $table_width

>><<

The table width (depends on the length of the channel names).


$idents

private array $idents

>>array( 0 => 'ident0.gif', // <BLANK> 1 => 'ident1.gif', // | 2 => 'ident2.gif', // |- 3 => 'ident3.gif' // L )<<

Filenames used by the _dump_ident() function.

See Also dump_table_all()

$host

private string $host

>><<

The host we are connected to - needed to create teamspeak client URLs in _dump_table_channel_parts().


Included Files, Type: require_once

ts2_tcpserver.inc

require_once( ts2_tcpserver.inc )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta