All the classes under a default namespace Application_ is autoloaded by default. When you are creating more modules, the classes under that module is not autoloaded.
I tried setting the extra module’s namespace on the application.ini like
autoloaderNamespaces[] = “EXTRA_”
but since the folder structure of the extra modules lies inside the Application it cannot find it.
How to set this correctly?
In the
Bootstrapclass for each module, create a new module resource autloloader:Then, you can use the “standard” folder structure for module-specific classes. For example, a form named
Mymodule_Form_Editwould reside in the filemodules/mymodule/forms/Edit.phpUPDATE
As noted by @Xerkus and others, a module Bootstrap extending
Zend_Application_Module_Bootstrapwill automatically register some standard namespace/path mappings, so no need to manually instantiate aZend_Application_Module_Autoloader.