/** * Sets a component property to be null. * * This method overrides the parent implementation by clearing * the specified attribute value. * @param string $name the property name or the event name */ public function __unset($name) { if ($this->hasAttribute($name)) { unset($this->_attributes[$name]); } elseif (array_key_exists($name, $this->_related)) { unset($this->_related[$name]); } elseif ($this->getRelation($name, false) === null) { parent::__unset($name); } }