Re: DB_DataObject and Structures_DataGrid integration

From: Date: Fri, 13 Aug 2004 18:03:06 +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-32641@lists.php.net to get a copy of this message
On Fri, 13 Aug 2004 12:35:39 -0400, Andrew Nagy <asnagy@webitecture.org> wrote: > Olivier Guilyardi wrote: > > > No problem, you're the boss ;) Is there a specific task you can assign > > to me ? > > Help design the datasource driver for DO. Or think about the > possibilities of a global datasource driver. My ideas are below for the > idea of a global datasource driver. This concept removes the need for a > switch detecting what source i am using. The downside is the class is > not something that will "do everything" for the app programmer, making > the programmer have to think about what "driver" to use. The good, no > switch statement that needs to be updated every time we add a new data > source as well as the extra processing time. I just came up with a > simple decorator patter, let me know if you have any other better design > ideas. > 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) { } > class Structures_DataGrid_Source_DataObject extends > Structures_DataGrid_Source > { > function Structures_DataGrid_Source_DataObject($source) > { > parent::Structures_DataGrid_Source($source); > } > > function fetch($source) > { > } > > function clear() > { > } > > function autoGenerateColumns() > { > } > } > > class Structures_DataGrid_Source > { > var $source; > > function Structures_DataGrid_Source($source) > { > $this->source = $source; > } > > function fetch() > { > } > > function clear() > { > } > } > > My only request, please don't use one letter variables! I hate them and > it makes sense to the creator but means jack to anyone else :) > > Andrew > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.pear.dev (#32641) next »