It appears to work fine. Here's my method, in case anyone's interested.
function reset()
{
$current_properties = get_object_vars( $this );
$default_properties = get_class_vars( get_class( $this ) );
if( empty( $default_properties ) )
$default_properties = array();
foreach( $current_properties as $property => $value )
{
if( !key_exists( $property, $default_properties ) ) // unset
{
unset( $this->{ $property } );
}
elseif( $property != 'DbAccess' && $property != 'UriManager' ) // reset
{
$this->{ $property } = $default_properties[ $property ];
}
}
}
voidstate