What is right way when using Zend_Form to create concrete application forms
1) Using "extends" and derived class
class MyForm extends Zend_Form {
public function __construct() {
$el = $this->createElement('text', 'el');
$this->addElement($el);
// ...
}
}
2) Or using delegation/proxy pattern
class MyForm {
private $_form;
public function __construct() {
$this->_form = new Zend_Form();
$el = $this->createElement('text', 'el');
$this->_form->addElement($el);
// ...
}
public function __call($I_method, $I_params) {
// ... forwarding calls to private delegate
}
}