public function __unset($name) { if (is_array($this->object)) { unset($this->object[$name]); return; } unset($this->object->{$name}); }