/**
* Method to reset the form data store and optionally the form XML definition.
*
* @param boolean $xml True to also reset the XML form definition.
*
* @return boolean True on success.
*
* @since 1.7.0
*/
public function reset($xml = false)
{
unset($this->data);
$this->data = new Registry();
if ($xml) {
unset($this->xml);
$this->xml = new \SimpleXMLElement('<form></form>');
}
return true;
}