function copyto($key) { $var =& \Base::instance()->ref($key); foreach ($this->fields + $this->adhoc as $key => $field) { $var[$key] = $field['value']; } }