2009年5月20日星期三

[fw-mvc] Zend_Loader_Autoloader and custom Zend_Db_Table rows

Since 1.8, Zend_Loader::registerAutoload() has been deprecated in favor of Zend_Loader_Autoloader. However, there are still several occurances of Zend_Loader::loadClass() within the framework (16 calls in 1.8.1). This is causing an exception to be thrown when specifying custom row/rowset classes in Zend_Db_Table_Abstract.

Exception: File "Default/Model/DbTable/Row/User.php" does not exist or class "Default_Model_DbTable_Row_User" was not found in the file

Would it be safe to replace all occurances of Zend_Loader::loadClass() with Zend_Loader_Autoloader::autoload()? Would that break BC for sites that still use the old Zend_Loader? Are there any other workarounds besides manually loading the file? Thanks!

-Hector

没有评论: