Issues

ZF-3486: Zend_Db_Table should allow for concrete instantiation

Description

There is already a Zend_Db_Table_Abstract, and Zend_Db_Table is an empty class. If Zend_Db_Table was concrete, I could do this without any issues:


$categoryTable = new Zend_Db_Table(array(
                                       'db'      => 'db',
                                       'name'    => 'category',
                                       'primary' => 'id'));

It seems like a mistake.

Comments

I believe what is now Zend_Db_Table_Abstract used to be Zend_Db_Table. I think it was moved to make it consistent with naming conventions throughout the rest of the framework and that it was kept as an abstract class to maintain backward compatibility.

Couple points for clarification:

1) Turning an abstract into a concrete class shouldn't affect backward compatibility 2) An abstract Zend_Db_Table class is inconsistent with other similar classes in ZendFW where a class was split into an abstract and concrete. For example: Zend_Db_Table_Row_Abstract (abstract) and Zend_Db_Table_Row (concrete). Another example: Zend_Db_Table_Rowset_Abstract (abstract) and Zend_Db_Table_Rowset (concrete).

Someone probably forgot to remove the 'abstract' keyword from the Zend_Db_Table definition when it was split into two classes.

The class also has @depreciated version 0.9 for some reason, should it be there?

Changed title

this would also require some better loadClass() handling inside row and rowset.

Fixed for ZF 1.9 as of r16802