MDL-24276 "static abstract" combination is deprecated since PHP 5.2, replacing with our coding_style exception

This commit is contained in:
Petr Skoda
2010-09-19 18:43:52 +00:00
parent dc157e0903
commit 7c109ea3f0
12 changed files with 61 additions and 23 deletions
+7 -3
View File
@@ -104,15 +104,19 @@ abstract class data_object {
* @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.