public function offsetUnset($offset) { if (property_exists($this, $offset)) { $this->{$offset} = null; } else { unset($this->{$offset}); } }