Index: lib/completion/data_object.php =================================================================== --- lib/completion/data_object.php (revision 1.3) +++ lib/completion/data_object.php (revision ) @@ -104,15 +104,19 @@ * @param array $params associative arrays varname=>value * @return object data_object instance or false if none found. */ - public static abstract function fetch($params); + public static function fetch($params) { + throw new coding_exception('fetch() method needs to be overridden in each subclass of data_object'); + } /** * Finds and returns all data_object instances based on params. * * @param array $params associative arrays varname=>value - * @return array array of data_object insatnces or false if none found. + * @return array array of data_object instances or false if none found. */ - public static function fetch_all($params) {} + public static function fetch_all($params) { + throw new coding_exception('fetch_all() method needs to be overridden in each subclass of data_object'); + } /** * Factory method - uses the parameters to retrieve matching instance from the DB. Index: lib/ddl/sql_generator.php =================================================================== --- lib/ddl/sql_generator.php (revision 1.36) +++ lib/ddl/sql_generator.php (revision ) @@ -1188,7 +1188,7 @@ * @return array of reserved words */ public static function getReservedWords() { - return array(); + throw new coding_exception('getReservedWords() method needs to be overridden in each subclass of sql_generator'); } /** Index: lib/googleapi.php =================================================================== --- lib/googleapi.php (revision 1.14) +++ lib/googleapi.php (revision ) @@ -42,12 +42,14 @@ * @copyright Dan Poltawski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -abstract class google_auth_request extends curl{ +abstract class google_auth_request extends curl { protected $token = ''; private $persistantheaders = array(); - // Must be overriden with the authorization header name - public abstract static function get_auth_header_name(); + // Must be overridden with the authorization header name + public static function get_auth_header_name() { + throw new coding_exception('get_auth_header_name() method needs to be overridden in each subclass of google_auth_request'); + } protected function request($url, $options = array()){ if($this->token){ Index: lib/grade/grade_object.php =================================================================== --- lib/grade/grade_object.php (revision 1.55) +++ lib/grade/grade_object.php (revision ) @@ -119,7 +119,9 @@ * @param array $params associative arrays varname=>value * @return object grade_object instance or false if none found. */ - public static abstract function fetch($params); + public static function fetch($params) { + throw new coding_exception('fetch() method needs to be overridden in each subclass of grade_object'); + } /** * Finds and returns all grade_object instances based on params. @@ -128,7 +130,9 @@ * @param array $params associative arrays varname=>value * @return array array of grade_object instances or false if none found. */ - public static abstract function fetch_all($params); + public static function fetch_all($params) { + throw new coding_exception('fetch_all() method needs to be overridden in each subclass of grade_object'); + } /** * Factory method - uses the parameters to retrieve matching instance from the DB. Index: backup/moodle2/restore_activity_task.class.php =================================================================== --- backup/moodle2/restore_activity_task.class.php (revision 1.8) +++ backup/moodle2/restore_activity_task.class.php (revision ) @@ -216,13 +216,17 @@ * Define the contents in the activity that must be * processed by the link decoder */ - abstract static public function define_decode_contents(); + static public function define_decode_contents() { + throw new coding_exception('define_decode_contents() method needs to be overridden in each subclass of restore_activity_task'); + } /** * Define the decoding rules for links belonging * to the activity to be executed by the link decoder */ - abstract static public function define_decode_rules(); + static public function define_decode_rules() { + throw new coding_exception('define_decode_rules() method needs to be overridden in each subclass of restore_activity_task'); + } // Protected API starts here Index: backup/moodle2/restore_block_task.class.php =================================================================== --- backup/moodle2/restore_block_task.class.php (revision 1.4) +++ backup/moodle2/restore_block_task.class.php (revision ) @@ -152,13 +152,17 @@ * Define the contents in the activity that must be * processed by the link decoder */ - abstract static public function define_decode_contents(); + static public function define_decode_contents() { + throw new coding_exception('define_decode_contents() method needs to be overridden in each subclass of restore_block_task'); + } /** * Define the decoding rules for links belonging * to the activity to be executed by the link decoder */ - abstract static public function define_decode_rules(); + static public function define_decode_rules() { + throw new coding_exception('define_decode_rules() method needs to be overridden in each subclass of restore_block_task'); + } // Protected API starts here Index: lib/portfolio/plugin.php =================================================================== --- lib/portfolio/plugin.php (revision 1.24) +++ lib/portfolio/plugin.php (revision ) @@ -153,7 +153,9 @@ * * @return string */ - public static abstract function get_name(); + public static function get_name() { + throw new coding_exception('get_name() method needs to be overridden in each subclass of portfolio_plugin_base'); + } /** * check sanity of plugin Index: backup/util/ui/base_ui.class.php =================================================================== --- backup/util/ui/base_ui.class.php (revision 1.2) +++ backup/util/ui/base_ui.class.php (revision ) @@ -212,7 +212,9 @@ * Loads the backup controller if we are tracking one * @return backup_controller|false */ - abstract public static function load_controller($uniqueid=false); + public static function load_controller($uniqueid=false) { + throw new coding_exception('load_controller() method needs to be overridden in each subclass of base_ui'); + } /** * Gets an array of progress bar items that can be displayed through the backup renderer. * @return array Array of items for the progress bar Index: lib/portfolio/formats.php =================================================================== --- lib/portfolio/formats.php (revision 1.14) +++ lib/portfolio/formats.php (revision ) @@ -39,14 +39,18 @@ /** * array of mimetypes this format supports */ - public static abstract function mimetypes(); + public static function mimetypes() { + throw new coding_exception('mimetypes() method needs to be overridden in each subclass of portfolio_format'); + } /** * for multipart formats, eg html with attachments, * we need to have a directory to place associated files in * inside the zip file. this is the name of that directory */ - public static abstract function get_file_directory(); + public static function get_file_directory() { + throw new coding_exception('get_file_directory() method needs to be overridden in each subclass of portfolio_format'); + } /** * given a file, return a snippet of markup in whatever format @@ -62,7 +66,9 @@ * * @return string some html or xml or whatever */ - public static abstract function file_output($file, $options=null); + public static function file_output($file, $options=null) { + throw new coding_exception('file_output() method needs to be overridden in each subclass of portfolio_format'); + } public static function make_tag($file, $path, $attributes) { $srcattr = 'href'; Index: backup/moodle2/backup_block_task.class.php =================================================================== --- backup/moodle2/backup_block_task.class.php (revision 1.5) +++ backup/moodle2/backup_block_task.class.php (revision ) @@ -210,5 +210,7 @@ * Code the transformations to perform in the block in * order to get transportable (encoded) links */ - abstract static public function encode_content_links($content); + static public function encode_content_links($content) { + throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_block_task'); -} + } +} Index: backup/moodle2/backup_activity_task.class.php =================================================================== --- backup/moodle2/backup_activity_task.class.php (revision 1.8) +++ backup/moodle2/backup_activity_task.class.php (revision ) @@ -274,6 +274,8 @@ * Code the transformations to perform in the activity in * order to get transportable (encoded) links */ - abstract static public function encode_content_links($content); + static public function encode_content_links($content) { + throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_activity_task'); + } } Index: lib/portfolio/caller.php =================================================================== --- lib/portfolio/caller.php (revision 1.17) +++ lib/portfolio/caller.php (revision ) @@ -334,7 +334,9 @@ return portfolio_most_specific_formats($specific, $basic); } - public abstract static function base_supported_formats(); + public static function base_supported_formats() { + throw new coding_exception('base_supported_formats() method needs to be overridden in each subclass of portfolio_caller_base'); + } /** * this is the "return to where you were" url @@ -352,7 +354,9 @@ /** * nice name to display to the user about this caller location */ - public abstract static function display_name(); + public static function display_name() { + throw new coding_exception('display_name() method needs to be overridden in each subclass of portfolio_caller_base'); + } /** * return a string to put at the header summarising this export @@ -475,7 +479,9 @@ * * @return array */ - public static abstract function expected_callbackargs(); + public static function expected_callbackargs() { + throw new coding_exception('expected_callbackargs() method needs to be overridden in each subclass of portfolio_caller_base'); + } /**