Hi,
//I've the class Application
class Application...
//I call show function from class Abstract
...
$seller = new Seller...
$seller->show(...)
...
$customer = new Customer...
$customer->show(...)
//I've also the class Abstract - it implements some common code code
for all classes Seller, Customer,... etc..
class Abstract...
...
function show(...){
...
$form = new HTML_QuickForm...
$this->List($form);
}
//here's Customer class - some special code for customer
class customer extends Abstract
function List($form){
$quickFormSelect = new HTML_QuickForm_select
...
$form->addElement($quickFormSelect));
}
of course, I can do it, using some "if's" i Abstract class, but the
above code could simplify my application, unfortunately it doesn't work
Any suggestions about this code?
ps.
the above code can looks like this:
....
function Lista(){
...
$quickFormSelect = new HTML_QuickForm_select
...
return $quickFormSelect;
}
//and then in Abstarct class
$form->addElement($this->Lista());
but in this solution I can add only one $quickFormSelect do $form, how
to add some more $quickFormSelect calling function List only one (like
in my unfortunetly non working code - $this->List($form);)
Daniel