/** * The magic unset, enables resources to be accessed like properties * @param string $name The name of the virtual property */ public function __unset($name) { if (isset($this->attributes[$name])) { return $this->attributes[$name]->delete(); } return parent::__unset($name); }