cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid addcolumn.xml bind.xml datasourcefactory.xml fill.xml
getcurrentrecordnumberstart.xml structures-datagrid.xml
| From: | Olivier Guilyardi | Date: | Sat, 01 Jul 2006 15:21:10 +0000 |
| Subject: | cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid addcolumn.xml bind.xml datasourcefactory.xml fill.xml getcurrentrecordnumberstart.xml structures-datagrid.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8117@lists.php.net to get a copy of this message | ||
olivierg Sat Jul 1 15:21:10 2006 UTC
Modified files:
/peardoc/en/package/structures/structures-datagrid/structures-datagrid
addcolumn.xml
bind.xml
datasourcefactory.xml
fill.xml
getcurrentrecordnumberstart.xml
structures-datagrid.xml
Log:
Removed line numbers from examples generated by PhpDoc, as asked by Daniel Convissor
http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml?r1=1.12&r2=1.13&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.12 peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.13 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.12 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.12 $ --> +<!-- $Revision: 1.13 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.addcolumn"> <refnamediv> <refname><function>Structures_DataGrid::addColumn</function></refname> @@ -109,11 +109,11 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.addcolumn.example"> <title>Examples</title> - <para><example><title>Adding a simple column</title><programlisting role="php-highlighted">1 <?php -2 $datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); -3 $column = new <link linkend="package.structures.structures-datagrid.structures-datagrid-column-summary">Structures_DataGrid_Column</link>('Title', 'title', 'title', array('align' => 'center'), 'N/A', null); -4 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); -5 ?> + <para><example><title>Adding a simple column</title><programlisting role="php-highlighted"><?php +$datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); +$column = new <link linkend="package.structures.structures-datagrid.structures-datagrid-column-summary">Structures_DataGrid_Column</link>('Title', 'title', 'title', array('align' => 'center'), 'N/A', null); +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml?r1=1.15&r2=1.16&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.15 peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.16 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.15 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.15 $ --> +<!-- $Revision: 1.16 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.bind"> <refnamediv> <refname><function>Structures_DataGrid::bind</function></refname> @@ -88,29 +88,29 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.bind.example"> <title>Examples</title> - <para><example><title>Bind an SQL query</title><programlisting role="php-highlighted">1 <?php -2 // Setup your database connection -3 $options = array('dsn' => 'mysql://user:password@host/db_name'); -4 -5 // Bind a basic SQL statement as datasource -6 // Note: ORDER BY and LIMIT clause are automatically added -7 $test = $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>('SELECT * FROM my_table', $options); -8 -9 // Print binding error if any -10 if (PEAR::isError($test)) { -11 echo $test->getMessage(); -12 } -13 ?> + <para><example><title>Bind an SQL query</title><programlisting role="php-highlighted"><?php +// Setup your database connection +$options = array('dsn' => 'mysql://user:password@host/db_name'); + +// Bind a basic SQL statement as datasource +// Note: ORDER BY and LIMIT clause are automatically added +$test = $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>('SELECT * FROM my_table', $options); + +// Print binding error if any +if (PEAR::isError($test)) { + echo $test->getMessage(); +} +?> </programlisting> </example></para> - <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted">1 <?php -2 $person = new DataObjects_Person; -3 -4 $person->hair = 'red'; -5 $person->has_glasses = 1; -6 -7 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); -8 ?> + <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted"><?php +$person = new DataObjects_Person; + +$person->hair = 'red'; +$person->has_glasses = 1; + +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.2 peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.3 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.2 Thu Jun 29 22:08:46 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.datasourcefactory"> <refnamediv> <refname><function>Structures_DataGrid::dataSourceFactory</function></refname> @@ -22,11 +22,11 @@ &title.desc; <para>A clever method which loads and instantiate data source drivers.</para> <para>Can be called in various ways:</para> -<para>Detect the source type and load the appropriate driver with default options: <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source); +<para>Detect the source type and load the appropriate driver with default options: <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source); </programlisting></para> -<para>Detect the source type and load the appropriate driver with custom options: <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options); +<para>Detect the source type and load the appropriate driver with custom options: <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options); </programlisting></para> -<para>Load a driver for an explicit type (faster, bypasses detection routine): <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options, $type); +<para>Load a driver for an explicit type (faster, bypasses detection routine): <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options, $type); </programlisting></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.9 Thu Jun 29 22:43:58 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.fill"> <refnamediv> <refname><function>Structures_DataGrid::fill</function></refname> @@ -89,46 +89,46 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.fill.example"> <title>Examples</title> - <para><example><title>Filling a Pager object</title><programlisting role="php-highlighted">1 <?php -2 -3 require_once 'Pager/Pager.php'; -4 -5 // Create a Pager object with your own options -6 $pager =& Pager::factory($options); -7 -8 // fill() sets the $pager object up, according to your data and settings -9 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); -10 -11 // Render the paging links -12 echo $pager->links; -13 -14 // Or a select field if you like that -15 echo $pager->getpageselectbox(); -16 -17 ?> + <para><example><title>Filling a Pager object</title><programlisting role="php-highlighted"><?php + +require_once 'Pager/Pager.php'; + +// Create a Pager object with your own options +$pager =& Pager::factory($options); + +// fill() sets the $pager object up, according to your data and settings +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); + +// Render the paging links +echo $pager->links; + +// Or a select field if you like that +echo $pager->getpageselectbox(); + +?> </programlisting> </example></para> - <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted">1 <?php -2 require_once 'HTML/QuickForm.php'; -3 -4 // Create an empty form with your settings -5 $form = new HTML_QuickForm('myForm', 'POST'); -6 -7 // Customize it, add a header, text field, etc.. -8 $form->addElement('header', null, 'Search & Sort Form Example'); -9 $form->addElement('text', 'my_search', 'Search for:'); -10 -11 // Let the datagrid add sort fields, radio style -12 $options = array('directionStyle' => 'radio'); -13 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form, $options); -14 -15 // You must add a submit button. fill() never does this -16 $form->addElement('submit', null, 'Submit'); -17 -18 // Use the native HTML_QuickForm::display() to print your form -19 $form->display(); -20 -21 ?> + <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted"><?php +require_once 'HTML/QuickForm.php'; + +// Create an empty form with your settings +$form = new HTML_QuickForm('myForm', 'POST'); + +// Customize it, add a header, text field, etc.. +$form->addElement('header', null, 'Search & Sort Form Example'); +$form->addElement('text', 'my_search', 'Search for:'); + +// Let the datagrid add sort fields, radio style +$options = array('directionStyle' => 'radio'); +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form, $options); + +// You must add a submit button. fill() never does this +$form->addElement('submit', null, 'Submit'); + +// Use the native HTML_QuickForm::display() to print your form +$form->display(); + +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml?r1=1.8&r2=1.9&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.8 peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.9 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.8 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart"> <refnamediv> <refname><function>Structures_DataGrid::getCurrentRecordNumberStart</function></refname> @@ -23,7 +23,7 @@ <refsect1 id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart.returns"> &title.returns; <para> - <emphasis>returns</emphasis> the number of the first record currently shown, or : 0 if there are no records, 1 if there is no row limit + <emphasis>returns</emphasis> the number of the first record currently shown, or : if there are no records, 1 if there is no row limit </para> </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart.throws"> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml?r1=1.11&r2=1.12&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.11 peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.12 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.11 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.structures-datagrid"> <refnamediv> <refname>constructor <function>Structures_DataGrid::Structures_DataGrid</function></refname> @@ -90,10 +90,10 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.structures-datagrid.example"> <title>Examples</title> - <para><example><title>Instantiation</title><programlisting role="php-highlighted">1 <?php -2 // Don't forget the ampersand -3 $datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); -4 ?> + <para><example><title>Instantiation</title><programlisting role="php-highlighted"><?php +// Don't forget the ampersand +$datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); +?> </programlisting> </example></para> </refsect1>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml?r1=1.12&r2=1.13&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.12 peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.13 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml:1.12 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/addcolumn.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.12 $ --> +<!-- $Revision: 1.13 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.addcolumn"> <refnamediv> <refname><function>Structures_DataGrid::addColumn</function></refname> @@ -109,11 +109,11 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.addcolumn.example"> <title>Examples</title> - <para><example><title>Adding a simple column</title><programlisting role="php-highlighted">1 <?php -2 $datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); -3 $column = new <link linkend="package.structures.structures-datagrid.structures-datagrid-column-summary">Structures_DataGrid_Column</link>('Title', 'title', 'title', array('align' => 'center'), 'N/A', null); -4 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); -5 ?> + <para><example><title>Adding a simple column</title><programlisting role="php-highlighted"><?php +$datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); +$column = new <link linkend="package.structures.structures-datagrid.structures-datagrid-column-summary">Structures_DataGrid_Column</link>('Title', 'title', 'title', array('align' => 'center'), 'N/A', null); +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml?r1=1.15&r2=1.16&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.15 peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.16 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml:1.15 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/bind.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.15 $ --> +<!-- $Revision: 1.16 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.bind"> <refnamediv> <refname><function>Structures_DataGrid::bind</function></refname> @@ -88,29 +88,29 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.bind.example"> <title>Examples</title> - <para><example><title>Bind an SQL query</title><programlisting role="php-highlighted">1 <?php -2 // Setup your database connection -3 $options = array('dsn' => 'mysql://user:password@host/db_name'); -4 -5 // Bind a basic SQL statement as datasource -6 // Note: ORDER BY and LIMIT clause are automatically added -7 $test = $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>('SELECT * FROM my_table', $options); -8 -9 // Print binding error if any -10 if (PEAR::isError($test)) { -11 echo $test->getMessage(); -12 } -13 ?> + <para><example><title>Bind an SQL query</title><programlisting role="php-highlighted"><?php +// Setup your database connection +$options = array('dsn' => 'mysql://user:password@host/db_name'); + +// Bind a basic SQL statement as datasource +// Note: ORDER BY and LIMIT clause are automatically added +$test = $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>('SELECT * FROM my_table', $options); + +// Print binding error if any +if (PEAR::isError($test)) { + echo $test->getMessage(); +} +?> </programlisting> </example></para> - <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted">1 <?php -2 $person = new DataObjects_Person; -3 -4 $person->hair = 'red'; -5 $person->has_glasses = 1; -6 -7 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); -8 ?> + <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted"><?php +$person = new DataObjects_Person; + +$person->hair = 'red'; +$person->has_glasses = 1; + +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.2 peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.3 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml:1.2 Thu Jun 29 22:08:46 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/datasourcefactory.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.datasourcefactory"> <refnamediv> <refname><function>Structures_DataGrid::dataSourceFactory</function></refname> @@ -22,11 +22,11 @@ &title.desc; <para>A clever method which loads and instantiate data source drivers.</para> <para>Can be called in various ways:</para> -<para>Detect the source type and load the appropriate driver with default options: <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source); +<para>Detect the source type and load the appropriate driver with default options: <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source); </programlisting></para> -<para>Detect the source type and load the appropriate driver with custom options: <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options); +<para>Detect the source type and load the appropriate driver with custom options: <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options); </programlisting></para> -<para>Load a driver for an explicit type (faster, bypasses detection routine): <programlisting role="php-highlighted">1 $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options, $type); +<para>Load a driver for an explicit type (faster, bypasses detection routine): <programlisting role="php-highlighted"> $driver =& <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>::<link linkend="package.structures.structures-datagrid.structures-datagrid.datasourcefactory">dataSourceFactory</link>($source, $options, $type); </programlisting></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml?r1=1.9&r2=1.10&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.9 peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.10 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml:1.9 Thu Jun 29 22:43:58 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/fill.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.fill"> <refnamediv> <refname><function>Structures_DataGrid::fill</function></refname> @@ -89,46 +89,46 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.fill.example"> <title>Examples</title> - <para><example><title>Filling a Pager object</title><programlisting role="php-highlighted">1 <?php -2 -3 require_once 'Pager/Pager.php'; -4 -5 // Create a Pager object with your own options -6 $pager =& Pager::factory($options); -7 -8 // fill() sets the $pager object up, according to your data and settings -9 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); -10 -11 // Render the paging links -12 echo $pager->links; -13 -14 // Or a select field if you like that -15 echo $pager->getpageselectbox(); -16 -17 ?> + <para><example><title>Filling a Pager object</title><programlisting role="php-highlighted"><?php + +require_once 'Pager/Pager.php'; + +// Create a Pager object with your own options +$pager =& Pager::factory($options); + +// fill() sets the $pager object up, according to your data and settings +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); + +// Render the paging links +echo $pager->links; + +// Or a select field if you like that +echo $pager->getpageselectbox(); + +?> </programlisting> </example></para> - <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted">1 <?php -2 require_once 'HTML/QuickForm.php'; -3 -4 // Create an empty form with your settings -5 $form = new HTML_QuickForm('myForm', 'POST'); -6 -7 // Customize it, add a header, text field, etc.. -8 $form->addElement('header', null, 'Search & Sort Form Example'); -9 $form->addElement('text', 'my_search', 'Search for:'); -10 -11 // Let the datagrid add sort fields, radio style -12 $options = array('directionStyle' => 'radio'); -13 $datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form, $options); -14 -15 // You must add a submit button. fill() never does this -16 $form->addElement('submit', null, 'Submit'); -17 -18 // Use the native HTML_QuickForm::display() to print your form -19 $form->display(); -20 -21 ?> + <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted"><?php +require_once 'HTML/QuickForm.php'; + +// Create an empty form with your settings +$form = new HTML_QuickForm('myForm', 'POST'); + +// Customize it, add a header, text field, etc.. +$form->addElement('header', null, 'Search & Sort Form Example'); +$form->addElement('text', 'my_search', 'Search for:'); + +// Let the datagrid add sort fields, radio style +$options = array('directionStyle' => 'radio'); +$datagrid-><link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form, $options); + +// You must add a submit button. fill() never does this +$form->addElement('submit', null, 'Submit'); + +// Use the native HTML_QuickForm::display() to print your form +$form->display(); + +?> </programlisting> </example></para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml?r1=1.8&r2=1.9&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.8 peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.9 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml:1.8 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/getcurrentrecordnumberstart.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart"> <refnamediv> <refname><function>Structures_DataGrid::getCurrentRecordNumberStart</function></refname> @@ -23,7 +23,7 @@ <refsect1 id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart.returns"> &title.returns; <para> - <emphasis>returns</emphasis> the number of the first record currently shown, or : 0 if there are no records, 1 if there is no row limit + <emphasis>returns</emphasis> the number of the first record currently shown, or : if there are no records, 1 if there is no row limit </para> </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.getcurrentrecordnumberstart.throws"> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml?r1=1.11&r2=1.12&diff_format=u Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.11 peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.12 --- peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml:1.11 Thu Jun 29 16:43:36 2006 +++ peardoc/en/package/structures/structures-datagrid/structures-datagrid/structures-datagrid.xml Sat Jul 1 15:21:10 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry id="package.structures.structures-datagrid.structures-datagrid.structures-datagrid"> <refnamediv> <refname>constructor <function>Structures_DataGrid::Structures_DataGrid</function></refname> @@ -90,10 +90,10 @@ </refsect1> <refsect1 id="package.structures.structures-datagrid.structures-datagrid.structures-datagrid.example"> <title>Examples</title> - <para><example><title>Instantiation</title><programlisting role="php-highlighted">1 <?php -2 // Don't forget the ampersand -3 $datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); -4 ?> + <para><example><title>Instantiation</title><programlisting role="php-highlighted"><?php +// Don't forget the ampersand +$datagrid =& new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); +?> </programlisting> </example></para> </refsect1>