cvs: peardoc /en/package/structures/structures-datagrid datasources.xml
| From: | Andrew Nagy | Date: | Mon, 04 Apr 2005 17:50:31 +0000 |
| Subject: | cvs: peardoc /en/package/structures/structures-datagrid datasources.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5875@lists.php.net to get a copy of this message | ||
asnagy Mon Apr 4 13:50:31 2005 EDT
Modified files:
/peardoc/en/package/structures/structures-datagrid datasources.xml
Log:
Tried to make the page look nicer and add additional information
http://cvs.php.net/diff.php/peardoc/en/package/structures/structures-datagrid/datasources.xml?r1=1.2&r2=1.3&ty=u
Index: peardoc/en/package/structures/structures-datagrid/datasources.xml
diff -u peardoc/en/package/structures/structures-datagrid/datasources.xml:1.2
peardoc/en/package/structures/structures-datagrid/datasources.xml:1.3
--- peardoc/en/package/structures/structures-datagrid/datasources.xml:1.2 Mon Apr 4 13:31:52 2005
+++ peardoc/en/package/structures/structures-datagrid/datasources.xml Mon Apr 4 13:50:29 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="package.structures.structures-datagrid.datasources">
<refnamediv>
<refname>Data Sources</refname>
@@ -20,8 +20,11 @@
<title>How to use the drivers</title>
<para>
To use the drivers, you can simply use the bind method, assuming your
- data source is listed below, otherwise you can use the bindDataSource
- method. The bind method will attempt to detect the datasource type and
+ data source is listed below, otherwise you can use the
+ <link
linkend="package.structures.structures_datagrid.structures_datagrid.binddatasource"><function>bindDataSource</function></link>
+ method. The
+ <link
linkend="package.structures.structures_datagrid.structures_datagrid.bind"><function>bind</function></link>
+ method will attempt to detect the datasource type and
may not be 100% accurate. Because of this chance for error, you may
choose to use the bindDataSource method where you can specifically define
the datasource driver to use. This method is also the method of choice
@@ -30,12 +33,59 @@
</refsect1>
<refsect1>
<title>Currently Available Data Source Drivers</title>
- <para>PEAR::DB_DataObject Object</para>
- <para>PEAR::DB_Result Object</para>
- <para>XML File</para>
- <para>CSV File</para>
- <para>RSS File</para>
- <para>Array</para>
+ <para>
+ The following listed drivers are currently packaged in with Structures_DataGrid.
+ </para>
+ <refsect2>
+ <title>PEAR::DB_DataObject Object</title>
+ <para>
+ The DataObject is the most optimal data source for the datagrid because
+ it allows the datagrid to only fetch the necessary records upon
+ rendering. Please note that when binding to a dataobject, do not run
+ the fetch method prior since the datagrid will run the fetch method
+ during the rendering.
+ </para>
+ </refsect2>
+ <refsect2>
+ <title>PEAR::DB_Result Object</title>
+ <para>
+ When using the DB_Result object, please keep in mind that the sorting
+ will not be automatic and must be done in the SQL directly. Also the
+ paging will not be optimized since your entire result set will be
+ limitied. It is best to implement the LIMIT clause manually unless
+ your database platform does not support this.
+ </para>
+ </refsect2>
+ <refsect2>
+ <title>XML File</title>
+ <para>
+ XML can simply be presented via the DataGrid. You can bind the
+ Datagrid to a URL directly or via the contents of the XML file.
+ </para>
+ </refsect2>
+ <refsect2>
+ <title>CSV File</title>
+ <para>
+ A CSV file can simply be presented via the DataGrid. You can bind the
+ Datagrid to a URL directly or via the contents of the CSV file.
+ </para>
+ </refsect2>
+ <refsect2>
+ <title>RSS File</title>
+ <para>
+ An RSS feed can simply be presented via the DataGrid. You can bind the
+ Datagrid to a URL directly or via the contents of the RSS file.
+ </para>
+ </refsect2>
+ <refsect2>
+ <title>Array</title>
+ <para>
+ The core data type that the datagrid uses is an Array. The Datagrid
+ maintains it's data in a 2-dimension associative array. The array keys
+ are uses as the column names. This of couse can be changed by
+ specifying the columns directly.
+ </para>
+ </refsect2>
</refsect1>
</refentry>