MDL-51784 various: use __construct() for PHP7 compatibility
This commit is contained in:
committed by
David Monllao
parent
05178f0745
commit
c4d0b752a2
+17
-1
@@ -1657,10 +1657,26 @@ class table_default_export_format_parent {
|
||||
* started yet.
|
||||
*/
|
||||
var $documentstarted = false;
|
||||
function table_default_export_format_parent(&$table) {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param flexible_table $table
|
||||
*/
|
||||
public function __construct(&$table) {
|
||||
$this->table =& $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Old syntax of class constructor. Deprecated in PHP7.
|
||||
*
|
||||
* @deprecated since Moodle 3.1
|
||||
*/
|
||||
public function table_default_export_format_parent(&$table) {
|
||||
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
|
||||
self::__construct($table);
|
||||
}
|
||||
|
||||
function set_table(&$table) {
|
||||
$this->table =& $table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user