cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid addcolumn.xml bind.xml datasourcefactory.xml fill.xml
getcurrentrecordnumberstart.xml structures-datagrid.xml

From: 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 &lt;?php -2 $datagrid =&amp; 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>(&apos;Title&apos;, &apos;title&apos;, &apos;title&apos;, array(&apos;align&apos; =&gt; &apos;center&apos;), &apos;N/A&apos;, null); -4 $datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); -5 ?&gt; + <para><example><title>Adding a simple column</title><programlisting role="php-highlighted">&lt;?php +$datagrid =&amp; 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>(&apos;Title&apos;, &apos;title&apos;, &apos;title&apos;, array(&apos;align&apos; =&gt; &apos;center&apos;), &apos;N/A&apos;, null); +$datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.addcolumn">addColumn</link>($column); +?&gt; </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 &lt;?php -2 // Setup your database connection -3 $options = array(&apos;dsn&apos; =&gt; &apos;mysql://user:password@host/db_name&apos;); -4 -5 // Bind a basic SQL statement as datasource -6 // Note: ORDER BY and LIMIT clause are automatically added -7 $test = $datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>(&apos;SELECT * FROM my_table&apos;, $options); -8 -9 // Print binding error if any -10 if (PEAR::isError($test)) { -11 echo $test-&gt;getMessage(); -12 } -13 ?&gt; + <para><example><title>Bind an SQL query</title><programlisting role="php-highlighted">&lt;?php +// Setup your database connection +$options = array(&apos;dsn&apos; =&gt; &apos;mysql://user:password@host/db_name&apos;); + +// Bind a basic SQL statement as datasource +// Note: ORDER BY and LIMIT clause are automatically added +$test = $datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>(&apos;SELECT * FROM my_table&apos;, $options); + +// Print binding error if any +if (PEAR::isError($test)) { + echo $test-&gt;getMessage(); +} +?&gt; </programlisting> </example></para> - <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted">1 &lt;?php -2 $person = new DataObjects_Person; -3 -4 $person-&gt;hair = &apos;red&apos;; -5 $person-&gt;has_glasses = 1; -6 -7 $datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); -8 ?&gt; + <para><example><title>Bind a DB_DataObject</title><programlisting role="php-highlighted">&lt;?php +$person = new DataObjects_Person; + +$person-&gt;hair = &apos;red&apos;; +$person-&gt;has_glasses = 1; + +$datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.bind">bind</link>($person); +?&gt; </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 =&amp; <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 =&amp; <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 =&amp; <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 =&amp; <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 =&amp; <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 =&amp; <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 &lt;?php -2 -3 require_once &apos;Pager/Pager.php&apos;; -4 -5 // Create a Pager object with your own options -6 $pager =&amp; Pager::factory($options); -7 -8 // fill() sets the $pager object up, according to your data and settings -9 $datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); -10 -11 // Render the paging links -12 echo $pager-&gt;links; -13 -14 // Or a select field if you like that -15 echo $pager-&gt;getpageselectbox(); -16 -17 ?&gt; + <para><example><title>Filling a Pager object</title><programlisting role="php-highlighted">&lt;?php + +require_once &apos;Pager/Pager.php&apos;; + +// Create a Pager object with your own options +$pager =&amp; Pager::factory($options); + +// fill() sets the $pager object up, according to your data and settings +$datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($pager); + +// Render the paging links +echo $pager-&gt;links; + +// Or a select field if you like that +echo $pager-&gt;getpageselectbox(); + +?&gt; </programlisting> </example></para> - <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted">1 &lt;?php -2 require_once &apos;HTML/QuickForm.php&apos;; -3 -4 // Create an empty form with your settings -5 $form = new HTML_QuickForm(&apos;myForm&apos;, &apos;POST&apos;); -6 -7 // Customize it, add a header, text field, etc.. -8 $form-&gt;addElement(&apos;header&apos;, null, &apos;Search &amp; Sort Form Example&apos;); -9 $form-&gt;addElement(&apos;text&apos;, &apos;my_search&apos;, &apos;Search for:&apos;); -10 -11 // Let the datagrid add sort fields, radio style -12 $options = array(&apos;directionStyle&apos; =&gt; &apos;radio&apos;); -13 $datagrid-&gt;<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-&gt;addElement(&apos;submit&apos;, null, &apos;Submit&apos;); -17 -18 // Use the native HTML_QuickForm::display() to print your form -19 $form-&gt;display(); -20 -21 ?&gt; + <para><example><title>Fill a form with sort fields</title><programlisting role="php-highlighted">&lt;?php +require_once &apos;HTML/QuickForm.php&apos;; + +// Create an empty form with your settings +$form = new HTML_QuickForm(&apos;myForm&apos;, &apos;POST&apos;); + +// Customize it, add a header, text field, etc.. +$form-&gt;addElement(&apos;header&apos;, null, &apos;Search &amp; Sort Form Example&apos;); +$form-&gt;addElement(&apos;text&apos;, &apos;my_search&apos;, &apos;Search for:&apos;); + +// Let the datagrid add sort fields, radio style +$options = array(&apos;directionStyle&apos; =&gt; &apos;radio&apos;); +$datagrid-&gt;<link linkend="package.structures.structures-datagrid.structures-datagrid.fill">fill</link>($form, $options); + +// You must add a submit button. fill() never does this +$form-&gt;addElement(&apos;submit&apos;, null, &apos;Submit&apos;); + +// Use the native HTML_QuickForm::display() to print your form +$form-&gt;display(); + +?&gt; </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 &lt;?php -2 // Don&apos;t forget the ampersand -3 $datagrid =&amp; new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); -4 ?&gt; + <para><example><title>Instantiation</title><programlisting role="php-highlighted">&lt;?php +// Don&apos;t forget the ampersand +$datagrid =&amp; new <link linkend="package.structures.structures-datagrid.structures-datagrid.structures-datagrid">Structures_DataGrid</link>(); +?&gt; </programlisting> </example></para> </refsect1>
« previous php.pear.doc (#8117) next »