}
/**
- * Store the variable with the value in the session scope.
- *
- * This function takes a name, value pair and stores this
- * in the session scope. Not sure what happens if we try
- * to store complex objects in the session. I suspect it
- * is supported but we need to verify this
- *
+ * Store a name-value pair in the session scope.
*
* @param string $name
* Name of the variable.
* @param mixed $value
- * Value of the variable.
+ * Value of the variable. It is safe to use scalar values here, as well as
+ * arrays whose leaf nodes are scalar values. Instances of built-in classes
+ * like DateTime may be safe, although the retrieved objects will be copies
+ * of the ones saved here. Instances of custom classes (such as those
+ * defined in CiviCRM core or extension code) will probably not be rebuilt
+ * correctly on retrieval. Resources and other special variable types are
+ * not safe to use. References will be dereferenced.
* @param string $prefix
* A string to prefix the keys in the session with.
*/