Zend Framework

Zend_Db_Table does not utilise its own getter methods

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Db_Table
  • Labels:
    None

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.

Activity

Hide
Ralph Schindler added a comment -

Fixed in trunk in r17821 and in release branch 1.9 in 17822

Show
Ralph Schindler added a comment - Fixed in trunk in r17821 and in release branch 1.9 in 17822
Hide
Marko Korhonen added a comment -

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

Show
Marko Korhonen added a comment - 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
Hide
Marko Korhonen added a comment -

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

Show
Marko Korhonen added a comment - 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

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
20m
Original Estimate - 20 minutes
Remaining:
20m
Remaining Estimate - 20 minutes
Logged:
Not Specified
Time Spent - Not Specified