Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: g:\Work\WWW\php\tbox\lib/csplitbar.phps
PHP Documentation - PHP/Toolbox

CSplitBar

CSnippet
  |
  +-- CSplitBar

The all-purpose class for programmatic pagination.

 

private class CSplitBar extends CSnippet

The all-purpose class for programmatic pagination.
It uses template substitution technique to generate the text 'buttons': - <FIRST>...</FIRST> - goto first page. - <PREV>...</PREV> - goto previous page. - <NEXT>...</NEXT> - goto next page. - <LAST>...</LAST> - goto last page. - <PAGELIST> - page list (e.g. 1 2 3 4 ...). - <PAGESIZE> - size of the page. - <TOTPAGES> - total number of pages. - <ITEM-RANGE> - range of items on current page (e.g. 26-50). Note that .curpage CSS-class is used to highlight current page.

 
Direct known subclasses: CDBTable

Methods inherited from CSnippet

csnippet, append, qualify, getglobal, setglobal, write, flush, writecode

Public Method Summary

void

CSplitBar( $id, $TOTROWS, array $attrs)

Constructs the splitbar

Private Method Summary

string

subst_globals(string $str)

Override it to provide custom template substitution.
void

render()

Main rendering method.

Fields inherited from CSnippet

$id

Private Field Summary

string

$SPLITBAR

integer

$PAGESIZE

integer

$TOTROWS

integer

$PGOFFS

integer

$PAGECOUNT

Public Method Details

CSplitBar

public void CSplitBar( $id, $TOTROWS, array $attrs )

  Constructs the splitbar
as, for example: $sbar = new CSplitBar("SB1", 250, array("PAGESIZE"=>25));

Parameter
$id
No additional comments.
$TOTROWS
No additional comments.
array $attrs
No additional comments.
Returns void


Private Method Details

subst_globals

private string subst_globals( string $str )

  Override it to provide custom template substitution.

Parameter
string $str
- template string.
Returns string

- substitution result.


render

private void render( )

  Main rendering method.
If page size isn't specified then it calculated as min(max(ceil($this->TOTROWS/10),25),50).

Returns void


Private Field Details

$SPLITBAR

private string $SPLITBAR

>>"<PREV><<</PREV><PAGELIST><NEXT>>></NEXT> (<ITEM-RANGE>)"<<



$PAGESIZE

private integer $PAGESIZE

>><<



$TOTROWS

private integer $TOTROWS

>><<



$PGOFFS

private integer $PGOFFS

>><<



$PAGECOUNT

private integer $PAGECOUNT

>><<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta