Zend Framework resource autoloading with appnamespace
A few days ago I was having problems getting my models autoloaded by Zend Framewok, after a little research I found the solution.
For this project I am using Zend_Application and Zend_Application_Bootstrap_Bootstrap for bootstraping my application. Enabling autoloading is as simple as adding this line to application.ini:
1
appnamespace = "Application"
or you could add a $_appNamespace property to your bootstrap class:
1
2
3
4
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected $_appNamespace = 'Application';
}