Zend Framework Autoloading in 3 modules
Posted
by haohan
on Stack Overflow
See other posts from Stack Overflow
or by haohan
Published on 2010-03-12T09:05:43Z
Indexed on
2010/03/12
9:07 UTC
Read the original article
Hit count: 187
zend-framework
I am new to ZF and I am writing in Zend Framework 1.10 . Here is my application directory structure.
APPLICATION_PATH`
+-configs
+-layouts
+-modules
+-admin
¦ +-controllers
¦ +-forms
¦ +-models
¦ +-views
¦ +-filters
¦ +-helpers
¦ +-scripts
¦ +-authentication
¦ +-cars
¦ +-index
+-default
+-controllers
+-forms
¦ +-admin
+-models
¦ +-DbTable
+-plugins
+-views
+-helpers
+-scripts
+-about
+-contact
+-error
+-index
+-insurance
+-used-cars
I have 3 bootstrap.php files in APPLICATION_PATH, /default/ and /admin,
i used AutoLoader to load models and forms
$modelLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '', 'basePath' => APPLICATION_PATH . '/modules/default'));
The code above will load all models and forms automatically in modules/default, and now, I have a problem to load forms and models in /modules/admin,
Any solutions to solve this problem? How should I name the class name in /modules/admin
Thanks.
© Stack Overflow or respective owner