Search code examples
phpzend-frameworkmodulezend-loader

Calling Models in Module in Zend Framework


I have a structure that is

application
application/modules
application/modules/default
application/modules/default/models
application/modules/admin
application/modules/admin/models

When calling controllers in admin I understand they must be named like Admin_TestController. This works fine, but my models in my admin module don't seem to be able to load. I have tried naming them and the files in all kinds of ways but it just doesn't seem to want to be able to load them. How should I name the file and model class in a module to be able to use it? I use autoloading.


Solution

  • As Fatmuemoo states the bootstrap for the module should extend Zend_Application_Module_Bootstrap also you should include

    resources.modules[] =
    

    In your config. This is in the docs for Zend_Application_Resource_Modules