Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0
-
Fix Version/s: 1.8.2
-
Component/s: Zend_Loader
-
Labels:None
Description
Zend own internally doesn't use my own class loader.
I set this:
MyZendLoader::registerAutoload('MyZendLoader');
And now for example in Zend_Db_Table_Row_Abstract is used this:
Zend_Loader::loadClass($tableClass);
But this static method is hardcoded and doesn't use my class loader, but table class it's my own class and I need use own class loader for it.
I found simple workarounfd, but it's necessary modify Zend_loader class and I don't like it.
public static function loadClass($class, $dirs = null) { if (class_exists($class, false) || interface_exists($class, false)) { return; } if (spl_autoload_functions()!==false) { spl_autoload_call($class); if (class_exists($class, false) || interface_exists($class, false)) return; }
I only add
if (spl_autoload_functions()!==false) { spl_autoload_call($class); if (class_exists($class, false) || interface_exists($class, false)) return; }
If is defined autoload function, Zend_Loader::loadClass() use it instead of default implementation.
Attachments
Issue Links
| This issue is duplicated by: | ||||
| ZF-3151 | The ZF is not able to use user-defined autoloaders for user-defined classes |
|
|
|
Resetting priority and assigning for review.