1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48:
<?php
abstract class AbstractCommentsBuildForm
{
private $form;
private $submit_button;
private $message_response;
public function display()
{
return $this->form->display();
}
protected abstract function create_form();
protected abstract function handle_submit();
protected function has_been_submited()
{
return $this->submit_button->has_been_submited() && $this->form->validate();
}
protected function get_form()
{
return $this->form;
}
protected function set_form(HTMLForm $form)
{
$this->form = $form;
}
protected function set_submit_button(FormButtonSubmit $submit_button)
{
$this->submit_button = $submit_button;
}
}
?>