Re: DB_DataObject and Structures_DataGrid integration
| From: | Justin Patrin | Date: | Fri, 13 Aug 2004 18:26:39 +0000 |
| Subject: | Re: DB_DataObject and Structures_DataGrid integration | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32645@lists.php.net to get a copy of this message | ||
On Fri, 13 Aug 2004 14:13:03 -0400, Andrew Nagy <asnagy@webitecture.org> wrote:
> Justin Patrin wrote:
>
> > A few more functions needed...
> >
> > function setOrderBy($column, $direction) {
> > }
> >
> > perhaps addOrderBy to allow multiple "order bys"?
> >
> > function setPageSize($pageSize) {
> > }
> >
> > function setPage($page) {
> > }
> >
> > OR
> >
> > function setLimit($offset, $size) {
> > }
> >
>
> Couldn't this information be obtained from the datagrid? Why does this
> functionality need to be replicated?
>
Unless the datasource has a reference to the DG in it, the DG needs to
tell the DataSource what to order by and how to limit. The Source
doesn't extend the Grid, the Grid uses a Source internally.
I would much rather have the DG tell the DS about these options than
the DS pull them directly from the DG. In addition, the DS should
absolutely *not* pull these directly from $_GET. The DG should do that
and pass them on.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--