Zend_Form constructor looks for a specific template in the method names in your form. The setMethodName template. the constructor calls the MethodName method and passes it a parameter.
So you get this in your class:
class My_Form extends Zend_Form { protected $_myParameters; public function setParams($myParameters) { $this->_myParameters = $myParameters; }
And you pass the parameters to your form with:
$form = new My_Form( array('params' => $myParameters) );
Therefore, you can use any other names instead of params (of course, if it does not already exist in Zend_Form ).
Ali Mousavi
source share