Responding to only some of the items here:
-- dinok <
dino.knoll@...> wrote
(on Wednesday, 14 November 2007, 02:22 PM -0800):
> Matthew Weier O'Phinney-3 wrote:
> > If you do this, it should be optional. I know many situations where I
> > only use the related table data in a fraction of requests to the parent
> > table.
> >
> Yes, of course. This is how its also implemented.
> I've added the parameter 'fetchLazy' to findDependetRowsets/findParentRow
> methods.
> Default it's set to true. This means, if a related record is not found in
> the $_data array, the old zf methods with find... are used. If it's set to
> false, the function returns (as the zf function too) null because no
> relations were found.
Good -- for BC and performance reasons, it's best to keep the default to
load only on demand.
> Matthew Weier O'Phinney-3 wrote:
> > Perhaps a factory that uses Zend_Registry for storage? This would
> > promote re-use, and be pretty lightweight.
> >
> Yes, exactly. This should be the fastest way and we can use just the
> classNames instead of the hole class reference.
>
> Example:
> Zend_Db_Table_Manger::getTable('className'): returns a classNameTable.
>
> Zend_Db_Table_Row/Rowset->__construct(): gets just the name instead of the
> class
>
> Zend_Db_Table_Row->save():
> Zend_Db_Table_Manger::getTable($this->_tableName)->update/insert/delete
>
> A possible implementation:
>
http://nopaste.php-quake.net/9491 http://nopaste.php-quake.net/9491
I'll take a look at that tomorrow.
--
Matthew Weier O'Phinney
PHP Developer |
matthew@...
Zend - The PHP Company |
http://www.zend.com/