|
|
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':
- ... - goto first page.
- ... - goto previous page.
- ... - goto next page.
- ... - goto last page.
- - page list (e.g. 1 2 3 4 ...).
- - size of the page.
- - total number of pages.
- - 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
|
|
|
|
|
Fields inherited from CSnippet |
$id |
|
|
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
>> <<
|
|
|
|
|
PHPDoc 1.0beta |