Zend Framework – Howto Autoload a model inside your module!
I have lost about an hour today battling this. I have a normal ZF directory structure:
/Application
/modules
/default
/controllers
/moduls
/views
/admin
/controllers
/moduls
/views
But for some reasone file located in /admin/moduls was not loaded authomaticly.
The problem was in missing Bootstrap.php located in the module root directory. It looks like this extention from Zend_Application_Module_Bootstrap makes the trick.
So all you have to do is to add a class:
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {}
And it will work!
Leave a Reply