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
Posted by Matthew Turland (elazar) on 2008-08-11T13:20:47.000+0000
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.
Posted by Moxley Stratton (moxley) on 2008-08-11T13:38:32.000+0000
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.
Posted by Ryan Mauger (bittarman) on 2008-12-03T13:08:43.000+0000
The class also has @depreciated version 0.9 for some reason, should it be there?
Posted by Ralph Schindler (ralph) on 2009-01-10T10:54:39.000+0000
Changed title
this would also require some better loadClass() handling inside row and rowset.
Posted by Ralph Schindler (ralph) on 2009-07-17T08:37:57.000+0000
Fixed for ZF 1.9 as of r16802