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

Class: AbstractTableDisplayer

Source Location: /_includes/lib_displayer.php

Class Overview


Describes an abstract table displayer which displays and splits up table contents over several pages. It allows pages to display menu bars so the users can select the desired page which displays a specified number of table rows.


Author(s):

  • Andreas Launila

Variables

Methods


Child classes:

CustomTableDisplayer
A displayer that takes a custom query and executes it. It can be used to perform more advanced queries than the notmal displayer can.
TableDisplayer
Describes a table displayer which displays and splits up table contents over several pages. It allows pages to display menu bars so the users can select the desired page which displays a specified number of table rows.

Class Details

[line 29]
Describes an abstract table displayer which displays and splits up table contents over several pages. It allows pages to display menu bars so the users can select the desired page which displays a specified number of table rows.



Tags:

abstract:  
author:  Andreas Launila


[ Top ]


Class Variables

$currentPage =

[line 36]

The page index that the displayer is currently displaying, the first page has index 0. As a special case -1 means that everything should be displayed.



Tags:

access:  protected

Type:   integer


[ Top ]

$rowsPerPage =

[line 41]

The maximum number of rows from the table that each page may display.



Tags:

access:  protected

Type:   integer


[ Top ]



Class Methods


constructor __construct [line 48]

AbstractTableDisplayer __construct( [integer $rowsPerPage = 10])

Constructor for AbstractTableDisplayer.



Tags:

access:  public


Overridden in child classes as:

CustomTableDisplayer::__construct()
Constructor for CustomTableDisplayer.
TableDisplayer::__construct()
Constructor for TableDisplayer.

Parameters:

integer   $rowsPerPage   The number of rows that should be displayed per page.

[ Top ]

method getPageMenuBar [line 62]

string getPageMenuBar( )

Gets a page menu associated with the table displayer. The menu contains links ordered in a bar which can be used to change the current page.



Tags:

return:  XHTML compliant code representing the menu bar.
access:  public


[ Top ]

method getPageRows [line 114]

array getPageRows( [array $fields = array()])

Gets the rows that should be displayed on the current page.



Tags:

return:  The selected rows and fields. The array contains one array per row. Each of those array rows contain keys with the specified field names along with the connected values. If no values were found then an empty array will be returned.
abstract:  
access:  public


Overridden in child classes as:

CustomTableDisplayer::getPageRows()
TableDisplayer::getPageRows()

Parameters:

array   $fields   An optional param to specify the names of the table fields that should be retrieved from the table. The default is that all fields are retrieved. The implementation do not necessarily have to obey this parameter, but should if possible.

[ Top ]

method getRowCount [line 121]

integer getRowCount( )

Gets the number of rows that the viewer can display in total. This is an abstract implementation and should be overridden by all subclasses.



Tags:

return:  A row count.
abstract:  
access:  protected


Overridden in child classes as:

CustomTableDisplayer::getRowCount()
TableDisplayer::getRowCount()

[ Top ]

method setRowsPerPage [line 129]

void setRowsPerPage( integer $newRowsPerPageValue)

Sets the number of rows that should be displayed on each page by the displayer.



Tags:

access:  public


Parameters:

integer   $newRowsPerPageValue   The new number of rows that should be displayed on each page.

[ Top ]


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