forms - Zend Framework and LoginController with LoginForm -


I have some stuff I'm trying to do with ZF; I have a LoginController.php in the application / controller / with the class LoginController Extends Zend_Controller_Action . Within this, I have the following:

  public function getForm () {Return new login form (array ('action' => gtk; '/ login / process', 'method' = & gt; ; ' Post',                 )); }  

I have LoginForm.php inside application / form / which has the following:

 < Code> Category LoginForm Zend_Form Extended {+ - 38 Lines: Public Function Init () -------------------------------- - -----------}  

Now, when I go to example.com/login, I get the following:

Fatal error: The class 'log inform' is not found on /var/application/controllers/LoginController.php on line 7

My default is application.ini . .

What am I doing wrong?

Check your bootstrap.php file. If you are using standard Autoloader there, then you need to prefix your form sections with form_

: A basic Autoloader declaration should look like this:

  $ autoloader = New Zend_Application_Module_Autoloader (array ('namespace' => gt; 'basepath' = & gt; dirname (__ FILE__),));  

So if this is the case, then your form class name should be Form_LoginForm ()


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -