com.lokorin.dfcrafters.lib
[ class tree: com.lokorin.dfcrafters.lib ] [ index: com.lokorin.dfcrafters.lib ] [ all elements ]

Class: Table

Source Location: /_includes/lib_tables.php

Class Overview


Describes a Table.


Author(s):

  • Andreas Launila

Variables

Methods



Class Details

[line 27]
Describes a Table.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$cssClass =

[line 50]

The CSS class to use for the header when displaying.



Tags:

access:  private

Type:   string


[ Top ]

$entryMap =

[line 38]

Contains an array which maps ints onto other ints. The mapping can rearange the order in which the row entries are displayed.



Tags:

access:  private

Type:   access


[ Top ]

$rows =

[line 45]

Contains an array which contains an array for each row. The key of the rows should be numeric, the value should be the value that should be displayed.



Tags:

access:  private

Type:   array


[ Top ]

$tableHeader =

[line 32]

Contains the header (if any) for the Table.



Tags:

access:  private

Type:   Header


[ Top ]



Class Methods


constructor __construct [line 55]

Table __construct( )

Constructor for Table.



Tags:

access:  public


[ Top ]

method addRow [line 84]

void addRow( array $row)

Adds a new row to the table.



Tags:

access:  public


Parameters:

array   $row   The row that should be added. The values of the array is the ones that should be added.

[ Top ]

method getHeader [line 75]

Header getHeader( )

Gets the header of the table.



Tags:

return:  The Header instance for the table.
access:  public


[ Top ]

method getTable [line 95]

string getTable( )

Gets the table in HTML format.



Tags:

return:  The describes table in HTML format.
access:  public


[ Top ]

method setCssClass [line 154]

void setCssClass( string $class)

Sets the CSS class that the table should use.



Tags:

access:  public


Parameters:

string   $class   The name of the CSS class to use.

[ Top ]

method setHeader [line 67]

void setHeader( Header $newHeader)

Sets a specified header as the new header that should be used by the table.



Tags:

access:  public


Parameters:

Header   $newHeader   The new header that should be used for the table.

[ Top ]

method setRowMapping [line 146]

void setRowMapping( array $map)

Sets a row mapping for the table to use. The row map rearranges the values of a row into a different order.



Tags:

access:  public


Parameters:

array   $map   The map should define value for all keys corresponding to the columns that it want changed in each row. The value should be the column to which the value should be moved. For instance the array (1 => 4, 4 => 1) will rearrange the values so that the second columns' values are moved to the fifth column and vice versa. Observe that the first column has index 0 and so on.

[ Top ]


Documentation generated on Tue, 10 Jan 2006 17:06:37 +0100 by phpDocumentor 1.3.0RC4