Merge branch 'MDL-50561-29' of git://github.com/jleyva/moodle into MOODLE_29_STABLE

This commit is contained in:
David Monllao
2015-06-22 16:04:10 +08:00
+14
View File
@@ -215,6 +215,20 @@ class message {
throw new \coding_exception("Invalid property $prop specified");
}
/**
* Magic method to check if property is set.
*
* @param string $prop name of property to check.
* @return bool
* @throws \coding_exception
*/
public function __isset($prop) {
if (in_array($prop, $this->properties)) {
return isset($this->$prop);
}
throw new \coding_exception("Invalid property $prop specified");
}
/**
* This method lets you define content that would be added to the message only for specific message processors.
*