Sitellite Application Framework
Class Tree         Index         All Elements

Class: HtmlTable

Source Location: Program_Root/HTML/Table.php

Class Overview


Renders an HTML table from a 2-dimensional array.


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 47]
Renders an HTML table from a 2-dimensional array.

Usage:


1 <?php
2
3 loader_import ('saf.HTML.Table');
4
5 $ht = new HtmlTable ();
6
7 // set the display properties
8 $ht->width = '50%';
9 $ht->border = 1;
10 $ht->spacing = 1;
11 $ht->firstRowHeaders (true);
12 $ht->setWidths (array ('50%', '25%', '25%'));
13
14 // set the data
15 $ht->setData (
16 array (
17 array ('one', 'two', 'three'),
18 array ('four', 'five', 'six'),
19 )
20 );
21
22 // display the table
23 echo $ht->render ();
24
25 // quick mode:
26 echo HtmlTable::render (
27 array (
28 array ('one', 'two', 'three'),
29 array ('four', 'five', 'six'),
30 )
31 );
32
33 ? >




[ Top ]


Class Variables

$border =  '0'

[line 50]


Type:   mixed


[ Top ]

$class =  false

[line 55]


Type:   mixed


[ Top ]

$data = array ()

[line 48]


Type:   mixed


[ Top ]

$frh =  false

[line 49]


Type:   mixed


[ Top ]

$id =  false

[line 56]


Type:   mixed


[ Top ]

$padding =  '3'

[line 51]


Type:   mixed


[ Top ]

$spacing =  '0'

[line 52]


Type:   mixed


[ Top ]

$style =  false

[line 54]


Type:   mixed


[ Top ]

$width =  false

[line 53]


Type:   mixed


[ Top ]

$widths = array ()

[line 57]


Type:   mixed


[ Top ]



Class Methods


constructor HtmlTable [line 59]

HtmlTable HtmlTable( [mixed $data = array ()])



[ Top ]

method firstRowHeaders [line 67]

void firstRowHeaders( [mixed $frh = true])



[ Top ]

method render [line 75]

void render( [mixed $data = null], [mixed $frh = null])



[ Top ]

method setData [line 63]

void setData( [mixed $data = array ()])



[ Top ]

method setWidths [line 71]

void setWidths( [mixed $widths = array ()])



[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:19:44 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2