From: tjhunt Date: Thu, 16 Jul 2009 10:38:15 +0000 (+0000) Subject: formslib: use abstract, rather than a print_error, now we have PHP5. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=afd63fe5095ac5eb7db767fe4065a458dd0dcbb2;p=moodle.git formslib: use abstract, rather than a print_error, now we have PHP5. --- diff --git a/lib/formslib.php b/lib/formslib.php index 5d83f9230e..6a689fdde7 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -88,7 +88,7 @@ function form_init_date_js() { * @copyright Jamie Pratt * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class moodleform { +abstract class moodleform { /** @var string */ protected $_formname; // form name /** @@ -753,9 +753,7 @@ class moodleform { * * If you need special handling of uploaded files, create instance of $this->_upload_manager here. */ - function definition() { - print_error('mustbeoverriden', 'form', '', get_class($this)); - } + protected abstract function definition(); /** * Dummy stub method - override if you need to setup the form depending on current