I am trying to autoload the forms found in my project under application/forms/*.php ( in this case, LoginForm.php ).
How do I configure Zends autoloader to load this form automatically? As I don't want to use ugly namespaces I am enabling the fallback in my bootstrap. I haven't got anything related to forms configured in my application.ini
thanks!
The default autoloader will load this for you. Make sure that you have checked the following:-
The file contains something like this:-
class Application_Form_Loginform extends Zend_Form
{
//Take special note of the capitalisation - it is important
// Also note it is Form NOT Forms
public function init()
{
//Your code here
}
}
Call your class like this:-
$form = new Application_Form_Loginform();
Take extra care over letter case, it is important that you get it exactly right or the autoloader will not find you class and will complain.