Extend $this with properties from the given object.
@todo Remove this function once $GLOBALS['language'] is gone.
public function extend($obj) {
$vars = get_object_vars($obj);
foreach ($vars as $var => $value) {
$this->{$var} = $value;
}
}