ZF-6901: Zend_Db_Table does not utilise its own getter methods
Description
Zend_Db_Table_Abstract has a getter method for $this->_rowClass. However, it does not use it in it's own functions - it references $this->_rowClass directly. This obviates their purpose, as far as I can see.
This means that developers cannot write custom logic to set $this->_rowClass. For instance, in my use-case, I have a digitalAssets table which contains filesystem references to images, MP3s, etc. It would be helpful if I could override $this->getRowClass() to return different row classes for each of these types - imageAsset, mp3Asset, etc.
Comments
Posted by Ralph Schindler (ralph) on 2009-08-25T17:04:17.000+0000
Fixed in trunk in r17821 and in release branch 1.9 in 17822
Posted by Marko Korhonen (back-2-95) on 2009-08-27T03:49:45.000+0000
Any examples on this?
I have same kind of situation and I have overridden Zend_Db_Table_Rowset_Abstract::current() and Zend_Db_Table_Abstract::fecthRow.
And I decide on type field in database, which rowClass should be used, image, file or video rowclass.
br, Marko
Posted by Marko Korhonen (back-2-95) on 2009-08-27T03:50:32.000+0000
Any examples on this?
I have same kind of situation and I have overridden Zend_Db_Table_Rowset_Abstract::current() and Zend_Db_Table_Abstract::fecthRow.
And I decide on type field in database, which rowClass should be used, image, file or video rowclass.
br, Marko