I tested it. The reset has no effect because the get_object_vars on getProperties() gives exactly how the variables are set. So can somebody explain me what is the target of this method (reset)?
I've some proposal,
on JObject:
Code:
function getProperties( $public = true, $object=true )
{
if( $object )
{
$vars = get_object_vars($this);
}
else
{
$vars = get_class_vars(get_class($this));
}
if($public)
{
foreach ($vars as $key => $value)
{
if ('_' == substr($key, 0, 1)) {
unset($vars[$key]);
}
}
}
return $vars;
}
on JTable:
Code:
/**
* Resets the default properties
* @return void
*/
function reset($reset_tab_key=false)
{
if( $reset_tab_key ){
$k = '';
}
else {
$k = $this->_tbl_key;
}
foreach ($this->getProperties(false,false) as $name => $value)
{
if($name != $k)
{
$this->$name = $value;
}
}
}