Location: PHPKode > projects > PHP Toolbox > apidoc/CSplitBar.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class CSplitBar</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
   <LINK REL="stylesheet" TYPE="text/css" HREF="docxx.css">
</HEAD>
 <body>
<h1>PHP/Toolbox#2</h1>
<a name=top>&nbsp;</a>
<div class="navbar">
=[<a href="index.html">Contents</a>]=[<a href="HIER.html">Class Tree</a>]=[<a href="#bottom">Bottom</a>]=
</div>
<br>
In file csplitbar.phps:<H2>class <A HREF="#DOC.DOCU">CSplitBar</A></H2></H2><BLOCKQUOTE> The all-purpose class for programmatic pagination.</BLOCKQUOTE>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>
The all-purpose class for programmatic pagination.
<xmp>
|	$sbar = new CSplitBar("SB1", array("PAGE_SIZE" => 25));
|	$sbar->start(250);
</xmp></BLOCKQUOTE>

<A NAME="DOC.DOCU"></A>
<HR>

<H2>Inheritance:</H2>
<H3>CSplitBar
- <A HREF="CSnippet.html">CSnippet</A>
</H3>
<HR>

<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.2">ITEM_COUNT</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.4">ITEM_END</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.3">ITEM_START</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.6">PAGE</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.5">PAGE_COUNT</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.52.1">PAGE_SIZE</A></B>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.16">BUTTON</A></B>($<!1><A HREF="CTextarea.html#DOC.53.1">type</A>, $label, $<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A>=)
<DD><I> Creates the specified button.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.7">CSplitBar</A></B>($<!1><A HREF="CSnippet.html#DOC.23.1">id</A>,	$<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A> = NULL)
<DD><I> Constructs the splitbar.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.9">FIRST_URI</A></B>()
<DD><I> URI to first page.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.12">LAST_URI</A></B>()
<DD><I> URI to last page.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.11">NEXT_URI</A></B>()
<DD><I> URI to next page.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.15">PAGE_LIST</A></B>($sep = , $<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A>=array(,)
<DD><I> Page list Template shortcut.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.14">PAGE_LIST_EACH</A></B>(&amp;$i)
<DD><I> Returns the page list entry (eg.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.13">PAGE_LIST_START</A></B>(&amp;$i)
<DD><I> Starts page list (eg.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.10">PREV_URI</A></B>()
<DD><I> URI to previous page.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>function <B><A HREF="#DOC.52.8">START</A></B>($<!1><A HREF="CSplitBar.html#DOC.52.2">ITEM_COUNT</A>)
<DD><I> Starts the splitbar.</I>
</DL></P>

</DL>
<HR><H3>Inherited from <A HREF="CSnippet.html">CSnippet</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif> <B>buffer</B>
<DT>
<IMG ALT="o" SRC=icon2.gif> <B>class</B>
<DT>
<IMG ALT="o" SRC=icon2.gif> <B>id</B>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>function <B>append</B>($fields)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>buffer</B>($str)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>flush</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>getExternal</B>($varName, $default = , $globalArrayName=)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>getGlobal</B>($varName, $default = )
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>getVar</B>($varName)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>qualify</B>($varName)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>reset_buffer</B>($str=)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>reset_class_vars</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>setExternal</B>($varName, $value, $globalArrayName=)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>setGlobal</B>($varName, $value)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>write</B>($str)
<DT>
<IMG ALT="o" SRC=icon2.gif>function <B>writeCode</B>($<!1><A HREF="CTextarea.html#DOC.53.3">code</A>, $eval=FALSE)
</DL></P>

</DL>
<DL>

<A NAME="PAGE_SIZE"></A>
<A NAME="DOC.52.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> PAGE_SIZE</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ITEM_COUNT"></A>
<A NAME="DOC.52.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ITEM_COUNT</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ITEM_START"></A>
<A NAME="DOC.52.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ITEM_START</B></TT>
<DL><DT><DD></DL><P>
<A NAME="ITEM_END"></A>
<A NAME="DOC.52.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ITEM_END</B></TT>
<DL><DT><DD></DL><P>
<A NAME="PAGE_COUNT"></A>
<A NAME="DOC.52.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> PAGE_COUNT</B></TT>
<DL><DT><DD></DL><P>
<A NAME="PAGE"></A>
<A NAME="DOC.52.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> PAGE</B></TT>
<DL><DT><DD></DL><P>
<A NAME="CSplitBar"></A>
<A NAME="DOC.52.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function CSplitBar($<!1><A HREF="CSnippet.html#DOC.23.1">id</A>,	$<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A> = NULL)</B></TT>
<DD>
Constructs the splitbar.
For example:
<code>$sbar = new CSplitBar("sb1", array("PAGE_SIZE"=>25));</code>
<DL><DT><DD></DL><P>
<A NAME="START"></A>
<A NAME="DOC.52.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function START($<!1><A HREF="CSplitBar.html#DOC.52.2">ITEM_COUNT</A>)</B></TT>
<DD>
Starts the splitbar.
You use it in a code/template to charge the item count.
<DL><DT><DD></DL><P>
<A NAME="FIRST_URI"></A>
<A NAME="DOC.52.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function FIRST_URI()</B></TT>
<DD>
URI to first page.
You use it in a template to render the link to 1st page.

<DL><DT><DT><B>Returns:</B><DD>  string	- URI<BR><DD></DL><P>
<A NAME="PREV_URI"></A>
<A NAME="DOC.52.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function PREV_URI()</B></TT>
<DD>
URI to previous page.
You use it in a template to render the link to previous page.

<DL><DT><DT><B>Returns:</B><DD>  string	- URI<BR><DD></DL><P>
<A NAME="NEXT_URI"></A>
<A NAME="DOC.52.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function NEXT_URI()</B></TT>
<DD>
URI to next page.
You use it in a template to render the link to next page.

<DL><DT><DT><B>Returns:</B><DD>  string	- URI<BR><DD></DL><P>
<A NAME="LAST_URI"></A>
<A NAME="DOC.52.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function LAST_URI()</B></TT>
<DD>
URI to last page.
You use it in a template to render the link to last page.

<DL><DT><DT><B>Returns:</B><DD>  string	- URI<BR><DD></DL><P>
<A NAME="PAGE_LIST_START"></A>
<A NAME="DOC.52.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function PAGE_LIST_START(&amp;$i)</B></TT>
<DD>
Starts page list (eg. 1 2 3 4 …).
You use it in a template to start page list rendering.
<DL><DT><DD></DL><P>
<A NAME="PAGE_LIST_EACH"></A>
<A NAME="DOC.52.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function PAGE_LIST_EACH(&amp;$i)</B></TT>
<DD>
Returns the page list entry (eg. 1 2 3 4 …).
You use it in a template to get page data:
<ul>
<li>	<code>$PAGE->NUM</code> - page number.
<li>	<code>$PAGE->URI</code> - page URI; it's null for <i>current</i> page.
</ul>
<DL><DT><DD></DL><P>
<A NAME="PAGE_LIST"></A>
<A NAME="DOC.52.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function PAGE_LIST($sep = , $<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A>=array(,)</B></TT>
<DD>
Page list Template shortcut.
You use it in a template to get a page list.

<DL><DT><DT><B>Parameters:</B><DD><B>string</B> - 	- list separator.
<BR><B>array</B> - 	- attr[0] - any page <!1><A HREF="CMarkup.html#DOC.20.1">attrs</A>, attr[1] - <i>current</i> page attrs.
<BR><DT><B>Returns:</B><DD>  string	- page list.<BR><DD></DL><P>
<A NAME="BUTTON"></A>
<A NAME="DOC.52.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>function BUTTON($<!1><A HREF="CTextarea.html#DOC.53.1">type</A>, $label, $<!1><A HREF="CMarkup.html#DOC.20.1">attrs</A>=)</B></TT>
<DD>
Creates the specified button.
You use it in a template to simplify localization.

<DL><DT><DT><B>Parameters:</B><DD><B>string</B> - 	- <i>name of the function</i> that returs URI: <!1><A HREF="CSplitBar.html#DOC.52.9">FIRST_URI</A>, <!1><A HREF="CSplitBar.html#DOC.52.11">NEXT_URI</A>, etc.
<BR><B>string</B> - 	- text label.
<BR><B>string</B> - 	- additional link's attrs.
<BR><DT><B>Returns:</B><DD>  string	- assembled button as a text link or
just a text if URI is null.<BR><DD></DL><P></DL>
<HR>
<DL><DT><B>Direct child classes:
</B><DD><A HREF="CDBTable.html">CDBTable</A><BR>
</DL>

<DL><DT><DD></DL><P> <a name=bottom>&nbsp;</a>
<div class="navbar">
=[<a href="index.html">Contents</a>]=[<a href="HIER.html">Class Tree</a>]=[<a href="#top">Top</a>]=
</div><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>
Return current item: PHP Toolbox