I have a Zend Framework modular application set up. One of my modules is called 'frontend' and it is the default module (resources.frontController.defaultModule = "frontend" is in my config file).
I have a form, Frontend_Form_PropertySearch located at /application/modules/frontend/forms/PropertySearch.php and attempting to use it in my controller as follows:
public function searchAction() { $form = new Frontend_Form_PropertySearch(); $form->submit->setLabel('Search'); $this->view->form = $form; } However, I'm getting the following error:
Fatal error: Class 'Frontend_Form_PropertySearch' not found in /Users/Martin/Dropbox/Repositories/realestatecms/application/modules/frontend/controllers/PropertiesController.php on line 17
Where am I going wrong?
appnamespaceis still set to 'Application' in my config file.resourceTypesarray if you are using the default Zend Application autoloader mappings. You can also just add it to your application bootstrap as in ZF1 all bootstraps are run regardless of your current module.