Here is what works for me in my module (Auth), to autoload files in the
module subdirectories
form, service, and models.
class Auth_Bootstrap extends Zend_Application_Module_Bootstrap
{
protected function _initAuthAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Auth_',
'basePath' => APPLICATION_PATH . '/modules/auth',
'resourceTypes' => array (
'form' => array(
'path' => 'forms',
'namespace' => 'Form',
),
'model' => array(
'path' => 'models',
'namespace' => 'Model',
),
'service' => array(
'path' => 'service',
'namespace' => 'Service',
)
)
));
return $autoloader;
}
}
My directory structure is
application
configs
controller
models
modules
admin...
auth
controllers
forms
models
services
views
Bootstrap.php
main...
library
public
tests
I notice that you have a default module inside your modules directory.
when Zend_Tool creates
a new project the default modules controllers, models, views are located in
the application directory.
Hope this is helpful.
jim
--
View this message in context:
http://www.nabble.com/Unable-to-autoload-module%27s-models-tp24659861p24673430.html
Sent from the Zend Framework mailing list archive at Nabble.com.