From b08b3569604066d3fbb02442beaf308391f43d11 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 8 Sep 2009 07:09:01 +0000 Subject: [PATCH] MDL-20232 making "object" class extend stdClass - this greatly helps with type checking --- lib/setuplib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/setuplib.php b/lib/setuplib.php index f938876c934..65b1f0576aa 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -39,13 +39,15 @@ define ('DEBUG_ALL', 6143); define ('DEBUG_DEVELOPER', 38911); /** - * Simple class + * Simple class. It is usually used instead of stdClass because it looks + * more familiar to Java develpers ;-) Do not use for type checking of + * function parameters. * * @package moodlecore * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class object {}; +class object extends stdClass {}; /** * Base Moodle Exception class