Re: DB_DataObject and Structures_DataGrid integration
| From: | Olivier Guilyardi | Date: | Fri, 13 Aug 2004 18:52:27 +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-32649@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On Fri, 13 Aug 2004 19:47:14 +0200, Olivier Guilyardi <ml@xung.org> wrote:the bind() method can instantiate the right kind of datasource. This is about two lines of code... Now, for some advanced features, one may need to create a DG_Source object before adding it to the datagrid. Why passing a such additionnal 'dataObject' parameter ? is_subclass_of() is everything we need. Some other sources can be parsable strings. -- ogSo I guess that the developer has to directly do : $datasource = new Structures_DataGrid_Source_DataObject($dataobject); Is that right ?If this is so, I'd like to propose something else. It would be best IMHO to have the data sources auto-included and created for us. Such as: $dg->bindDataSource('dataObject', $do);