hi again,

I've been trying to use Zend_Application_Module_Autoloader recently with a namespace containing a _ such as: Module_User

Now, the namespace appears to be set by Zend_Loader_Autoloader_Resource::setNamespace() which just takes the string, removes any trailing _ and assigns it to the _namespace property. That bit works fine.

However, the autoload fails because Zend_Application_Module_Autoloader::getClassPath() checks to see whether the top namespace part (separated by _) matches the _namespace argument (l. 148). In my example this tries to match 'Module' with 'Module_User' and understandably fails.

My question is, is Zend_Loader_Autoloader_Resource supposed to support namespaces which contain _ characters in the middle of the text? Or am I pushing things a little too far with this example?

If namespaces shouldn't contain _ in the middle of the text can I suggest some validation is added to setNamespace() to make detecting this issue a little easier :)

best wishes,
Si

Reply via email to