MDL-51784 various: use __construct() for PHP7 compatibility

This commit is contained in:
Marina Glancy
2015-12-11 12:48:24 +08:00
committed by David Monllao
parent 05178f0745
commit c4d0b752a2
35 changed files with 235 additions and 60 deletions
+17 -1
View File
@@ -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;
}